cloud-fan commented on code in PR #38511:
URL: https://github.com/apache/spark/pull/38511#discussion_r1023935711
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileSourceStrategy.scala:
##########
@@ -146,8 +146,12 @@ object FileSourceStrategy extends Strategy with
PredicateHelper with Logging {
}
def apply(plan: LogicalPlan): Seq[SparkPlan] = plan match {
- case PhysicalOperation(projects, filters,
+ case ScanOperation(projects, allFilters,
l @ LogicalRelation(fsRelation: HadoopFsRelation, _, table, _)) =>
+ // We can only push down the bottom-most filter to the relation, as
`ScanOperation` decided to
+ // not merge these filters and we need to keep their evaluation order.
+ val filters = allFilters.lastOption.getOrElse(Nil)
Review Comment:
This is the only place that does column pruning and filter pushdown
together. Making `ScanOperation` return both `allFilters` and `pushdownFilters`
will make the code more verbose in other places.
--
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]