holdenk commented on a change in pull request #32921:
URL: https://github.com/apache/spark/pull/32921#discussion_r658922064
##########
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:
Want to file a JIRA for this?
--
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]