aokolnychyi commented on a change in pull request #32921:
URL: https://github.com/apache/spark/pull/32921#discussion_r660233482
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/dynamicpruning/PartitionPruning.scala
##########
@@ -66,10 +71,33 @@ object PartitionPruning extends Rule[LogicalPlan] with
PredicateHelper with Join
}
case _ => None
}
+ case (resExp, r @ DataSourceV2ScanRelation(_, scan:
SupportsDynamicFiltering, _)) =>
+ val filterAttrs = AttributeSet(resolveRefs(r, scan.filterAttributes))
+ if (resExp.references.subsetOf(filterAttrs)) {
+ Some(r)
+ } else {
+ None
+ }
case _ => None
}
}
+ // TODO: is there a good place to put this?
+ private def resolveRefs(
Review comment:
This has been fixed too. Resolving.
--
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]