weixiuli commented on code in PR #36724:
URL: https://github.com/apache/spark/pull/36724#discussion_r885224233
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/dynamicpruning/CleanupDynamicPruningFilters.scala:
##########
@@ -54,7 +54,8 @@ object CleanupDynamicPruningFilters extends Rule[LogicalPlan]
with PredicateHelp
val newCondition = condition.transformWithPruning(
_.containsPattern(DYNAMIC_PRUNING_SUBQUERY)) {
case dynamicPruning: DynamicPruningSubquery
- if unnecessaryPruningKeys.contains(dynamicPruning.pruningKey) =>
+ if unnecessaryPruningKeys.contains(dynamicPruning.pruningKey) ||
+ dynamicPruning.pruningKey.references.isEmpty =>
Review Comment:
Shall we set the `unnecessaryPruningKeys` to a lazy and check the
`dynamicPruning.pruningKey.references.isEmpty` before ` the
unnecessaryPruningKeys.contains(dynamicPruning.pruningKey)` ?
--
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]