-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-26448][SQL][followup] should not normalize grouping expressions for final aggregate #23692
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
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.
A small refactor so that we can retain the alias when normalizing.
|
Test build #101872 has finished for PR 23692 at commit
|
|
retest this please |
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.
Don't we need to remove it from AggUtils.createAggregate?
|
Test build #101879 has finished for PR 23692 at commit
|
|
Test build #101886 has finished for PR 23692 at commit
|
| val stateVersion = conf.getConf(SQLConf.STREAMING_AGGREGATION_STATE_FORMAT_VERSION) | ||
|
|
||
| // Ideally this should be done in `NormalizeFloatingNumbers`, but we do it here because | ||
| // `groupingExpressions` is not extracted during logical phase. |
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.
This will be refactored after https://issues.apache.org/jira/browse/SPARK-25914?
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.
yea
|
LGTM since the current hack will be removed soon.
…On Wed, Jan 30, 2019 at 11:47 PM Wenchen Fan ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala
<#23692 (comment)>:
> @@ -331,8 +332,17 @@ abstract class SparkStrategies extends QueryPlanner[SparkPlan] {
val stateVersion = conf.getConf(SQLConf.STREAMING_AGGREGATION_STATE_FORMAT_VERSION)
+ // Ideally this should be done in `NormalizeFloatingNumbers`, but we do it here because
+ // `groupingExpressions` is not extracted during logical phase.
yea
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23692 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ALCApUDTB69icwWGqz6tjj3FguVL_-ATks5vIp-hgaJpZM4aZix8>
.
|
|
thanks, merging to master! |
…s for final aggregate ## What changes were proposed in this pull request? A followup of apache#23388 . `AggUtils.createAggregate` is not the right place to normalize the grouping expressions, as final aggregate is also created by it. The grouping expressions of final aggregate should be attributes which refer to the grouping expressions in partial aggregate. This PR moves the normalization to the caller side of `AggUtils`. ## How was this patch tested? existing tests Closes apache#23692 from cloud-fan/follow. Authored-by: Wenchen Fan <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
What changes were proposed in this pull request?
A followup of #23388 .
AggUtils.createAggregateis not the right place to normalize the grouping expressions, as final aggregate is also created by it. The grouping expressions of final aggregate should be attributes which refer to the grouping expressions in partial aggregate.This PR moves the normalization to the caller side of
AggUtils.How was this patch tested?
existing tests