Skip to content

Conversation

@peter-toth
Copy link
Contributor

@peter-toth peter-toth commented Apr 26, 2022

What changes were proposed in this pull request?

To remove unnecessary changes from InjectRuntimeFilterSuite after #32298. These are not needed after #34929 as the final optimized plan does'n contain any WithCTE nodes.

Why are the changes needed?

No need for those changes.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Added new test.

@peter-toth peter-toth changed the title [SPARK-34079][SQL] Follow-up to revert some changes in InjectRuntimeFilterSuite [SPARK-34079][SQL][FOLLOW-UP] Revert some changes in InjectRuntimeFilterSuite Apr 26, 2022
@github-actions github-actions bot added the SQL label Apr 26, 2022
@peter-toth
Copy link
Contributor Author

cc @cloud-fan

1
val numBloomFilterAggs = plan.collect {
case Filter(condition, _) => condition.collect {
case subquery: org.apache.spark.sql.catalyst.expressions.ScalarSubquery
Copy link
Contributor

Choose a reason for hiding this comment

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

I like the previous code more as it precisely matches Filter and ScalarSubquery. +1 to this change.

My major concern is scalarSubqueryCTEMultiplicator. This makes the test really hard to write as we need to manually think about if scalar subqueries merging can be applied or not to the testing query.

Can we turn off this optimization completely in this test suite? We can add one more test to verify the case that scalar subqueries merging is beneficial to bloom filter join, by explicitly enabling the optimizer rule.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it, let me check...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

7ac7981 removes scalarSubqueryCTEMultiplicator, 9b1347e adds a new test

@cloud-fan
Copy link
Contributor

thanks, merging to master/3.3!

@cloud-fan cloud-fan closed this in d05e01d Apr 27, 2022
cloud-fan pushed a commit that referenced this pull request Apr 27, 2022
…terSuite

To remove unnecessary changes from `InjectRuntimeFilterSuite` after #32298. These are not needed after #34929 as the final optimized plan does'n contain any `WithCTE` nodes.

No need for those changes.

No.

Added new test.

Closes #36361 from peter-toth/SPARK-34079-multi-column-scalar-subquery-follow-up-2.

Authored-by: Peter Toth <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
(cherry picked from commit d05e01d)
Signed-off-by: Wenchen Fan <[email protected]>
@peter-toth
Copy link
Contributor Author

Thanks @cloud-fan for the review!

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