Skip to content

Conversation

@ulysses-you
Copy link
Contributor

What changes were proposed in this pull request?

  • Add LogicalQueryStage(_, agg: BaseAggregateExec) check in AQEPropagateEmptyRelation
  • Add LeafNode check in PropagateEmptyRelationBase, so we can eliminate LogicalQueryStage to LocalRelation

Why are the changes needed?

The Aggregate in AQE is different with others, the LogicalQueryStage looks like LogicalQueryStage(Aggregate, BaseAggregate). We should handle this case specially.

Logically, if the Aggregate grouping expression is not empty, we can eliminate it safely.

Does this PR introduce any user-facing change?

no

How was this patch tested?

add new test

@github-actions github-actions bot added the SQL label Jan 7, 2022
@ulysses-you
Copy link
Contributor Author

[info] - SPARK-37578: Update output metrics from Datasource v2 *** FAILED *** (65 milliseconds)
[info]   123 did not equal 246 (SQLAppStatusListenerSuite.scala:936)

The failed test is not related, also find in https://github.com/apache/spark/pull/35127. cc @cloud-fan

@cloud-fan
Copy link
Contributor

can you also address #32602 (comment) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small bug fix, the previous is
Alias(newAttr, oldAttr.name)(oldAttr.exprId, explicitMetadata = newExplicitMetadata)

We should make alias use the not same expr id with references as the integral check do LogicalPlanIntegrity.checkIfExprIdsAreGloballyUnique.

@ulysses-you ulysses-you deleted the SPARK-35442 branch January 10, 2022 01:29
@ulysses-you
Copy link
Contributor Author

The GA seems broken due to unknown, move to #35149

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants