wangyum commented on a change in pull request #33664:
URL: https://github.com/apache/spark/pull/33664#discussion_r688285523
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkOptimizer.scala
##########
@@ -42,8 +42,7 @@ class SparkOptimizer(
override def defaultBatches: Seq[Batch] = (preOptimizationBatches ++
super.defaultBatches :+
Batch("Optimize Metadata Only Query", Once,
OptimizeMetadataOnlyQuery(catalog)) :+
Batch("PartitionPruning", Once,
- PartitionPruning,
- OptimizeSubqueries) :+
+ PartitionPruning) :+
Batch("Pushdown Filters from PartitionPruning", fixedPoint,
Review comment:
Another option is:
```scala
private val partitionPruningRules = Seq(PartitionPruning) ++
(if (catalog.conf.dynamicPartitionPruningReuseBroadcastOnly) Nil else
Seq(OptimizeSubqueries))
Batch("PartitionPruning", Once,
partitionPruningRules: _*) :+
```
--
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]