using subquery return error result
Steps to reproduce: List the minimal actions needed to reproduce the behavior.
- ... the subquery
> SELECT DIFFERENCE(value) as value FROM "umonitor3_reveive_data" WHERE time >= now() -10m and time < now() -5m and cluster='上海二可用区B' and module='transfer' GROUP BY cluster, module, uuid
name: umonitor3_reveive_data
tags: cluster=上海二可用区B, module=transfer, uuid=172.18.38.99:21596
time value
---- -----
1570512770000000000 1187719
1570512800000000000 1203208
1570512830000000000 1157254
1570512860000000000 1142176
1570512890000000000 1145959
1570512920000000000 1166716
1570512950000000000 1157830
1570512980000000000 1156849
1570513010000000000 1145312
name: umonitor3_reveive_data
tags: cluster=上海二可用区B, module=transfer, uuid=172.18.68.85:7293
time value
---- -----
1570512770000000000 1127535
1570512800000000000 1122153
1570512830000000000 1167487
1570512860000000000 1181080
1570512890000000000 1181331
1570512920000000000 1161704
1570512950000000000 1163652
1570512980000000000 1170303
1570513010000000000 1177681
- ... the main query
select * from (SELECT DIFFERENCE(value) as value FROM "umonitor3_reveive_data" WHERE time>= now() -10m and time < now() -5m and cluster='上海二可用区B' and module='transfer' GROUP BY cluster, module, uuid) name: umonitor3_reveive_data time cluster module uuid value
1570512770000000000 上海二可用区B transfer 172.18.68.85:7293 45636736142 1570512770000000000 上海二可用区B transfer 172.18.38.99:21596 -45313092594 1570512800000000000 上海二可用区B transfer 172.18.38.99:21596 45315483521 1570512800000000000 上海二可用区B transfer 172.18.68.85:7293 -45636736142 1570512830000000000 上海二可用区B transfer 172.18.68.85:7293 45639025782 1570512830000000000 上海二可用区B transfer 172.18.38.99:21596 -45315466001 1570512860000000000 上海二可用区B transfer 172.18.38.99:21596 45317765431 1570512860000000000 上海二可用区B transfer 172.18.68.85:7293 -45639025782 1570512890000000000 上海二可用区B transfer 172.18.68.85:7293 45641388193 1570512890000000000 上海二可用区B transfer 172.18.38.99:21596 -45317747768 1570512920000000000 上海二可用区B transfer 172.18.38.99:21596 45320060443 1570512920000000000 上海二可用区B transfer 172.18.68.85:7293 -45641388193 1570512950000000000 上海二可用区B transfer 172.18.68.85:7293 45643713549 1570512950000000000 上海二可用区B transfer 172.18.38.99:21596 -45320041463 1570512980000000000 上海二可用区B transfer 172.18.38.99:21596 45322356142 1570512980000000000 上海二可用区B transfer 172.18.68.85:7293 -45643713549 1570513010000000000 上海二可用区B transfer 172.18.68.85:7293 45646061533 1570513010000000000 上海二可用区B transfer 172.18.38.99:21596 -45322338622
Expected behavior: Describe what you expected to happen.
the main query (select * from ) should return data that the subquery's result, why are there negative numbers and irrelevant numbers?
Actual behavior: Describe What actually happened. I got some negative numbers and irrelevant numbers .
Environment info:
- System info: Run
uname -srmand copy the output here
> [root@hd06-umon-181-241 ~]# uname -srm
Linux 4.1.0-25.el6.ucloud.x86_64 x86_64
- InfluxDB version: Run
influxd versionand copy the output here
[root@hd06-umon-181-241 ~]# influxd version
InfluxDB v1.7.6 (git: 1.7 01c8dd416270f424ab0c40f9291e269ac6921964)
- Other relevant environment details: Container runtime, disk info, etc
Config: Copy any non-default config values here or attach the full config as a gist or file.
reporting-disabled = true
bind-address = "0.0.0.0:8088"
[meta]
dir = "/data/influxdb/meta"
retention-autocreate = true
logging-enabled = true
[data]
dir = "/data/influxdb/data"
wal-dir = "/data/influxdb/wal"
index-version = "tsi1"
cache-max-memory-size = "100g"
cache-snapshot-memory-size = "50m"
max-series-per-database = 10000000
max-values-per-tag = 1000000
[coordinator]
write-timeout = "20s"
max-concurrent-queries = 0
query-timeout = "0s"
log-queries-after = "0s"
max-select-point = 0
max-select-series = 0
max-select-buckets = 0
[retention]
enabled = true
check-interval = "30m"
[shard-precreation]
enabled = true
check-interval = "10m"
advance-period = "30m"
[monitor]
store-enabled = true
store-database = "_internal"
store-interval = "10s"
[http]
enabled = true
flux-enabled = true
bind-address = "172.20.181.241:8086"
auth-enabled = true
log-enabled = true
access-log-path = "/var/log/influxdb/influxdb.log"
write-tracing = false
pprof-enabled = true
https-enabled = false
https-certificate = "/etc/ssl/influxdb.pem"
max-row-limit = 0
[logging]
[subscriber]
[[graphite]]
enabled = false
[[collectd]]
enabled = false
[[opentsdb]]
enabled = false
[[udp]]
enabled = false
[continuous_queries]
enabled = true
log-enabled = true
[tls]
Logs: no error logs.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had recent activity. Please reopen if this issue is still important to you. Thank you for your contributions.