getInfluxQLQueryApi.query() Execution results "InfluxQLQueryResult" Why is there no tag column ?
isMrZhang opened this issue · 0 comments
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.
- Create Client
InfluxDBClient influxDB = InfluxDBClientFactory.createV1(url, user, password.toCharArray(), database, policy)
.setLogLevel(LogLevel.BASIC);
- 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)
- 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}]}
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}]}
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