Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

percentile returns unexpected result #23485

Open
zimmnik opened this issue Jun 23, 2022 · 0 comments
Open

percentile returns unexpected result #23485

zimmnik opened this issue Jun 23, 2022 · 0 comments

Comments

@zimmnik
Copy link

zimmnik commented Jun 23, 2022

Steps to reproduce:

  1. 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
  1. Load data to inlfluxdb
influx -ssl -host somename -username admin -password 'secret' -import -path=NOAA_data2.txt -precision=s -database=NOAA_water_database5
  1. Open REPL
influx -ssl -host somename -precision rfc3339 -username admin -password 'secret' -database NOAA_water_database5
  1. Check timeseries
select water_level from h2o_feet
  1. 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
image

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant