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

[Feature Request]: Reduce expense of calculating quantiles #28388

Open
1 of 15 tasks
scwhittle opened this issue Sep 11, 2023 · 0 comments
Open
1 of 15 tasks

[Feature Request]: Reduce expense of calculating quantiles #28388

scwhittle opened this issue Sep 11, 2023 · 0 comments

Comments

@scwhittle
Copy link
Contributor

What would you like to happen?

The algorigthm used by ApproximateQuantiles ends up calculating all percentiles (ie 1-100) even if you just want 99%. The combiner state is quite large, by default ~35K if using doubles, which can add a lot of overhead if it is modified by a few elements at a time.

Some possible improvements:

  • add compression and diff-based encoding for the buffers in ApproximateQuantiles
  • investigate other streaming algorithms to calculate quantiles, such as t-digests which may be more space efficient

Issue Priority

Priority: 3 (nice-to-have improvement)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Samza Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant