gengliangwang commented on a change in pull request #28805:
URL: https://github.com/apache/spark/pull/28805#discussion_r444675403
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/PruneFileSourcePartitions.scala
##########
@@ -87,8 +88,17 @@ private[sql] object PruneFileSourcePartitions extends
Rule[LogicalPlan] {
_,
_))
if filters.nonEmpty && fsRelation.partitionSchemaOption.isDefined =>
- val (partitionKeyFilters, _) = getPartitionKeyFiltersAndDataFilters(
- fsRelation.sparkSession, logicalRelation, partitionSchema, filters,
logicalRelation.output)
+ val predicates =
conjunctiveNormalFormAndGroupExpsByReference(filters.reduceLeft(And))
Review comment:
Yeah, in brief:
* if we are pushing predicates through Join, then we can group by the
qualifier since there are multiple tables.
* if we are pushing predicates to underlying file source of a table, we
should group by the reference.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]