influxdb
influxdb copied to clipboard
percentile returns unexpected result
Steps to reproduce:
- Make file with content
# DDL
CREATE DATABASE NOAA_water_database5
# DML
# CONTEXT-DATABASE: NOAA_water_database5
h2o_feet,location=coyote_creek water_level=9,level\ description="between 6 and 9 feet" 1566000000
h2o_feet,location=coyote_creek water_level=19,level\ description="between 6 and 9 feet" 1566000360
h2o_feet,location=coyote_creek water_level=29,level\ description="between 6 and 9 feet" 1566000720
h2o_feet,location=coyote_creek water_level=39,level\ description="between 6 and 9 feet" 1566001080
h2o_feet,location=coyote_creek water_level=49,level\ description="between 6 and 9 feet" 1566001440
h2o_feet,location=coyote_creek water_level=59,level\ description="between 6 and 9 feet" 1566001800
h2o_feet,location=coyote_creek water_level=69,level\ description="between 6 and 9 feet" 1566002160
h2o_feet,location=coyote_creek water_level=79,level\ description="between 6 and 9 feet" 1566002520
h2o_feet,location=coyote_creek water_level=89,level\ description="between 6 and 9 feet" 1566002880
h2o_feet,location=coyote_creek water_level=99,level\ description="between 6 and 9 feet" 1566003240
- Load data to inlfluxdb
influx -ssl -host somename -username admin -password 'secret' -import -path=NOAA_data2.txt -precision=s -database=NOAA_water_database5
- Open REPL
influx -ssl -host somename -precision rfc3339 -username admin -password 'secret' -database NOAA_water_database5
- Check timeseries
select water_level from h2o_feet
- Check percentile result
select percentile(water_level, 50) from h2o_feet
Expected behavior:
2019-08-17T00:30:00Z 59
Actual behavior:
2019-08-17T00:24:00Z 49
it's conflicting with documentation

Environment info:
- System info: Linux 4.18.0-240.1.1.el8_3.x86_64 x86_64
- InfluxDB version: InfluxDB v1.8.6 (git: 1.8 v1.8.6)
Config:
$ cat /etc/influxdb/influxdb.conf | egrep -v "^#|^$|^ #"
[meta]
dir = "/var/lib/influxdb/meta"
[data]
dir = "/var/lib/influxdb/data"
wal-dir = "/var/lib/influxdb/wal"
max-values-per-tag = 0
series-id-set-cache-size = 100
[coordinator]
[retention]
[shard-precreation]
[monitor]
[http]
flux-enabled = true
bind-address = ":8086"
auth-enabled = true
log-enabled = true
suppress-write-log = false
access-log-path = "/var/log/influxdb/access.log"
https-enabled = true
https-certificate = "/etc/influxdb/certs/inno.tech.crt"
https-private-key = "/etc/influxdb/certs/inno.tech.key"
[logging]
[subscriber]
[[graphite]]
[[collectd]]
[[opentsdb]]
[[udp]]
[continuous_queries]
[tls]
Logs: None:
Jun 23 13:12:11 influx1 influxd[189821]: ts=2022-06-23T10:12:11.778737Z lvl=info msg="Executing query" log_id=0bEgNYH0000 service=query query="SELECT percentile(water_level, 50) FROM NOAA_water_database5.autogen.h2o_feet"