-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-27986][SQL][followup] window aggregate function with filter predicate is not supported #27476
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
maropu
left a comment
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.
LGTM, pending Jenkins.
|
Thank you. LGTM. |
| e.failAnalysis( | ||
| "distinct aggregates are not allowed in observed metrics, but found: " + s.sql) | ||
| case a: AggregateExpression if a.filter.isDefined => | ||
| e.failAnalysis("aggregates with filter predicate are not allowed in " + |
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.
I lost the information. Thank you.
|
Test build #117990 has finished for PR 27476 at commit
|
|
Test build #117991 has finished for PR 27476 at commit
|
viirya
left a comment
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.
good catch!
dongjoon-hyun
left a comment
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.
+1, LGTM. Thank you all.
Merged to master/3.0.
…edicate is not supported ### What changes were proposed in this pull request? This is a followup of #26656. We don't support window aggregate function with filter predicate yet and we should fail explicitly. Observable metrics has the same issue. This PR fixes it as well. ### Why are the changes needed? If we simply ignore filter predicate when we don't support it, the result is wrong. ### Does this PR introduce any user-facing change? yea, fix the query result. ### How was this patch tested? new tests Closes #27476 from cloud-fan/filter. Authored-by: Wenchen Fan <wenchen@databricks.com> Signed-off-by: Dongjoon Hyun <dhyun@apple.com> (cherry picked from commit 5a4c70b) Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
…edicate is not supported ### What changes were proposed in this pull request? This is a followup of apache#26656. We don't support window aggregate function with filter predicate yet and we should fail explicitly. Observable metrics has the same issue. This PR fixes it as well. ### Why are the changes needed? If we simply ignore filter predicate when we don't support it, the result is wrong. ### Does this PR introduce any user-facing change? yea, fix the query result. ### How was this patch tested? new tests Closes apache#27476 from cloud-fan/filter. Authored-by: Wenchen Fan <wenchen@databricks.com> Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
What changes were proposed in this pull request?
This is a followup of #26656.
We don't support window aggregate function with filter predicate yet and we should fail explicitly.
Observable metrics has the same issue. This PR fixes it as well.
Why are the changes needed?
If we simply ignore filter predicate when we don't support it, the result is wrong.
Does this PR introduce any user-facing change?
yea, fix the query result.
How was this patch tested?
new tests