Skip to content

getInfluxQLQueryApi.query() Execution results "InfluxQLQueryResult" Why is there no tag column ? #534

@isMrZhang

Description

@isMrZhang

getInfluxQLQueryApi.query() Execution results "InfluxQLQueryResult" Why is there no tag column ?
Works fine in influxdb-java 2.19, There is a tag column in the query results, But there is no tag column in "InfluxQLQueryResult:

Steps to reproduce:
List the minimal actions needed to reproduce the behavior.

  1. Create Client
InfluxDBClient influxDB = InfluxDBClientFactory.createV1(url, user, password.toCharArray(), database, policy)
            .setLogLevel(LogLevel.BASIC);
  1. Build SQL
String querySqlStr = "select mean(heart_rate) AS avg,max(heart_rate) AS max,min(heart_rate) AS min,last(heart_rate) AS last from health_course_heart_rate  where course_id::tag = '572' and org_id::tag = 'EDUCLOUD' group by user_id::tag fill(0)";

InfluxQLQuery influxQLQuery    = new InfluxQLQuery(querySqlStr, getDatabase())
            .setPrecision(InfluxQLQuery.InfluxQLPrecision.MILLISECONDS)
            .setRetentionPolicy(policy)
  1. Query
    InfluxQLQueryResult query = influxDB.getInfluxQLQueryApi().query(influxQLQuery);

Expected behavior:
Describe what you expected to happen.
Query results should contain fields(avg, max, min, last) and Tag(user_id),
{"results":[{"series":[{"columns":{"time":0,"avg":1,"max":2,"min":3,"last":4,""},"name":"health_course_heart_rate","values":[{"values":["0","82.59020979020978","107","41","104","xxxxx1"]},{"values":["0","73.34210526315789","87","50","73","xxxxx2"]},{"values":["0","84.04209328782707","108","73","98","xxxxx3"]}]}],"index":0}]}
image

Actual behavior:
Describe What actually happened.
getInfluxQLQueryApi.query() Execution results "InfluxQLQueryResult" no tag column
{"results":[{"series":[{"columns":{"time":0,"avg":1,"max":2,"min":3,"last":4},"name":"health_course_heart_rate","values":[{"values":["0","82.59020979020978","107","41","104"]},{"values":["0","73.34210526315789","87","50","73"]},{"values":["0","84.04209328782707","108","73","98"]}]}],"index":0}]}
image

Specifications:

  • Client Version: influxdb-client-java 6.8.0 , flux-dsl 6.8.0
  • InfluxDB Version: influxdb:1.8.10
  • JDK Version: 11.0.9
  • Platform: Win10

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy