viirya commented on a change in pull request #28366:
URL: https://github.com/apache/spark/pull/28366#discussion_r418430419
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceStrategy.scala
##########
@@ -547,21 +553,31 @@ object DataSourceStrategy {
// Pushing one leg of AND down is only safe to do at the top level.
// You can see ParquetFilters' createFilter for more details.
for {
- leftFilter <- translateFilterWithMapping(left,
translatedFilterToExpr)
- rightFilter <- translateFilterWithMapping(right,
translatedFilterToExpr)
+ leftFilter <- translateFilterWithMapping(
+ left, translatedFilterToExpr, nestedPredicatePushdownEnabled)
+ rightFilter <- translateFilterWithMapping(
+ right, translatedFilterToExpr, nestedPredicatePushdownEnabled)
} yield sources.And(leftFilter, rightFilter)
case expressions.Or(left, right) =>
for {
- leftFilter <- translateFilterWithMapping(left,
translatedFilterToExpr)
- rightFilter <- translateFilterWithMapping(right,
translatedFilterToExpr)
+ leftFilter <- translateFilterWithMapping(
+ left, translatedFilterToExpr, nestedPredicatePushdownEnabled)
+ rightFilter <- translateFilterWithMapping(
+ right, translatedFilterToExpr, nestedPredicatePushdownEnabled)
} yield sources.Or(leftFilter, rightFilter)
case expressions.Not(child) =>
- translateFilterWithMapping(child,
translatedFilterToExpr).map(sources.Not)
+ translateFilterWithMapping(child, translatedFilterToExpr,
nestedPredicatePushdownEnabled)
+ .map(sources.Not)
case other =>
- val filter = translateLeafNodeFilter(other)
+ val pushableColumn = if (nestedPredicatePushdownEnabled) {
+ PushableColumnAndNestedColumn
+ } else {
+ PushableColumnWithoutNestedColumn
+ }
Review comment:
ok
----------------------------------------------------------------
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]