Skip to content

Error when using Percentile function #388

@mladen-djordjevic

Description

@mladen-djordjevic

Specifications:

  • Client Version: 6.3.0
  • InfluxDB Version: 2.x
  • JDK Version: 8
  • Platform:

I am experiencing error when using the percentile function:
HTTP status code: 400; Message: error @5:5-5:15: undefined identifier percentile

After some investigation, it looks like in Flux the percentile function is renamed (changed) to quantile and Flux queries that are generated with influxdb-client-java using percentile function are no longer valid:

from(bucket:"events")
    |> range(start:2022-07-22T08:00:00.000000000Z, stop:2022-07-28T20:00:00.000000000Z)
    |> percentile(percentile:95.0)

Percentile function doc in influxdb-client-java:
https://github.com/influxdata/influxdb-client-java/tree/master/flux-dsl#percentile

Quantile function in Flux doc:
https://github.com/influxdata/flux/blob/master/docs/SPEC.md#quantile-selector

Please review my findings above. I am also happy to fix this with Pull Request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions