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

Merge TDigest with different compression factors #221

Open
jameswang2015 opened this issue Sep 24, 2024 · 3 comments
Open

Merge TDigest with different compression factors #221

jameswang2015 opened this issue Sep 24, 2024 · 3 comments

Comments

@jameswang2015
Copy link

Sometimes we get a TDigest field with different compression factors(For example, we change compression factor but some users still use old versions of product that still have old compression factors). The current Merge function can't handle that. Can we extend the Merge function to support that?

On the other hand, we currently follow these steps to merge it. Would this make sense?

  1. Destruct the tdigest into a list of centroids and weights.
  2. Unnest the list of centroids and weights.
  3. Merge the centroids and weights into a single tdigest with the specified compression by using TDIGEST_AGG(m, w, compression)

Thanks.

@tdunning
Copy link
Owner

tdunning commented Sep 30, 2024 via email

@jameswang2015
Copy link
Author

Thanks @tdunning for the advise! What's the effective meaning change for the compression factor by 3.2 => 3.3 upgrade? We observes that now the compression factor is most likely equal to the size of centroid means/weights, does this sound right to you?

@tdunning
Copy link
Owner

tdunning commented Oct 2, 2024 via email

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

2 participants