sigmod commented on a change in pull request #36047:
URL: https://github.com/apache/spark/pull/36047#discussion_r841117061
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkOptimizer.scala
##########
@@ -45,7 +45,8 @@ class SparkOptimizer(
PartitionPruning) :+
Batch("InjectRuntimeFilter", FixedPoint(1),
InjectRuntimeFilter,
- RewritePredicateSubquery) :+
+ RewritePredicateSubquery,
+ OptimizeSubqueries) :+
Review comment:
Thanks for the great catch, @Flyangz!
Does it work if we do the following here:
https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/InjectRuntimeFilter.scala#L88
`ConstantFolding(ColumnPruning(Aggregate(Nil, Seq(alias),
filterCreationSidePlan)))`
`OptimizeSubqueries` seems a bit of an overkill as
- it runs all rules again for other non-BloomFilter subqueries as well
- the BoomFilter creation query's input to the BloomFilterAggregate has
already been optimized
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]