-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
add quantileInterpolatedWeighted function #38252
add quantileInterpolatedWeighted function #38252
Conversation
66e8aaf
to
4b727e8
Compare
The name can be confusing, as it can be confused with approximate quantile sketches. |
Sure, thank you for the comment. I'm thinking of replacing |
eb87eb9
to
4e7f8b0
Compare
Ok. |
3a05ba7
to
95800b2
Compare
(I'll do it finally since it's only a rename) |
dd4d1e8
to
d0bfb4e
Compare
@evillique the PR is ready for your review, would appreciate your feedback. |
Co-authored-by: Nikolay Degterinsky <43110995+evillique@users.noreply.github.com>
I'm sorry that it took so long to get back to this PR, could you please update this branch to the latest master and add documentation similar to this? ClickHouse/src/Functions/concatWithSeparator.cpp Lines 158 to 163 in 6e5e2d5
|
@evillique thank you for taking a look again, sure I will rebase and update again today. |
@evillique rebased and fixed the build failures mostly (failing ones seem unrelated but obscure to me). For docs, I added a separate markdown for this function. (If you want me to add docs in the way you have recommended - can I do that in an another PR ? Looks like it needs to be done for other quantile and possibly for other aggregate functions as well.) |
Sometimes builders fail for unrelated reasons. When the status of the build is something similar to
For now, internal documentation for aggregate functions is not required but is recommended. If you can also do it for other aggregate functions it would be greatly appreciated. Also, it looks like AST fuzzer (ubsan) test failure is related to the changes in this PR:
|
Interesting, the AST fuzzer for ubsan passed for the previous commit - no code changes. I'll take a look. |
fef6080
to
633f2bc
Compare
@evillique it would be nice to get this merged if the changes look good to you ? Let me know if you have any more changes that you want me to make. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably also mention quantiles* function here: docs/en/sql-reference/aggregate-functions/reference/quantiles.md:12
9424da3
to
6fc4672
Compare
sure added. |
59066da
to
24d3db1
Compare
@bharatnc WDYT you think is it valid to add non integer weights as well? Like when user has % as weight with 1 as cumulative sum. |
Hi, I think it'll be okay to support non integer weights depending on the use case. I chose to stick with integer weights for this implementation of |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Add
quantileInterpolatedWeighted
/quantilesInterpolatedWeighted
functions.The current
quantileExactWeighted
function returns the exact quantile. Add another weighted quantile function that instead approximates the quantiles: