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

Error when using Percentile function #388

Closed
mladen-djordjevic opened this issue Jul 29, 2022 · 2 comments · Fixed by #390
Closed

Error when using Percentile function #388

mladen-djordjevic opened this issue Jul 29, 2022 · 2 comments · Fixed by #390
Labels
bug Something isn't working
Milestone

Comments

@mladen-djordjevic
Copy link

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.

@bednar
Copy link
Contributor

bednar commented Jul 29, 2022

Hi @mladen-djordjevic,

thanks for using our client and report this issue. We will take a look

As a workaround you can use https://github.com/influxdata/influxdb-client-java/tree/master/flux-dsl#custom-expressions

Regards

@bednar bednar added the bug Something isn't working label Jul 29, 2022
@mladen-djordjevic
Copy link
Author

Thank you for the quick response. Custom expression is doing the job for now.

Best Regards.

@bednar bednar added this to the 6.5.0 milestone Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants