-
Notifications
You must be signed in to change notification settings - Fork 1.7k
(Re)Support old syntax for approx_percentile_cont
and approx_percentile_cont_with_weight
#16999
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
Conversation
…ercentile_cont_with_weight
approx_percentile_cont
and approx_percentile_cont_with_weight
} else { | ||
// User defined aggregate functions (UDAF) have precedence in case it has the same name as a scalar built-in function | ||
if let Some(fm) = self.context_provider.get_aggregate_meta(&name) { | ||
if fm.is_ordered_set_aggregate() && within_group.is_empty() { |
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.
there appears to be no tests for this error nor any reason I can see for not allowing it
|
||
# csv_query_approx_percentile_cont (c2, alternate syntax, should be the same as above) | ||
query B | ||
SELECT (ABS(1 - CAST(approx_percentile_cont(c2, 0.1) AS DOUBLE) / 1.0) < 0.05) AS q FROM aggregate_test_100 |
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.
now both the new and old queries work
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.
The docs need to be updated too.
In 6c283df |
Thanks again @crepererum |
…ntile_cont_with_weight` (apache#16999) * Add sqllogictests * Allow both new and old sytanx for approx_percentile_cont and approx_percentile_cont_with_weight * Update docs * Add documentation and more tests
…ntile_cont_with_weight` (apache#16999) * Add sqllogictests * Allow both new and old sytanx for approx_percentile_cont and approx_percentile_cont_with_weight * Update docs * Add documentation and more tests
…ntile_cont_with_weight` (apache#16999) * Add sqllogictests * Allow both new and old sytanx for approx_percentile_cont and approx_percentile_cont_with_weight * Update docs * Add documentation and more tests
…ntile_cont_with_weight` (apache#16999) * Add sqllogictests * Allow both new and old sytanx for approx_percentile_cont and approx_percentile_cont_with_weight * Update docs * Add documentation and more tests
Which issue does this PR close?
approx_percentile_cont
andapprox_percentile_cont_with_weight
#16955Rationale for this change
We had customers relying on the old syntax, and there appears to be no reason (or tests) that the old syntax is barred
What changes are included in this PR?
Remove the error that prevents runnings queries like this
Are these changes tested?
Yes, new sqllogictests are added
Are there any user-facing changes?
Yes, new (well, old) syntax is supported as well