aokolnychyi commented on a change in pull request #33008:
URL: https://github.com/apache/spark/pull/33008#discussion_r660076623
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2ScanRelationPushDown.scala
##########
@@ -30,6 +30,35 @@ object V2ScanRelationPushDown extends Rule[LogicalPlan] {
import DataSourceV2Implicits._
override def apply(plan: LogicalPlan): LogicalPlan = plan transformDown {
+ case RowLevelOperation(operation, cond, relation: DataSourceV2Relation,
rewritePlan) =>
+ val mergeTable = relation.table.asMergeTable
+ val scanBuilder = mergeTable.newScanBuilder(relation.options)
+
+ val normalizedFilters = DataSourceStrategy.normalizeExprs(cond :: Nil,
relation.output)
+ val (_, normalizedFiltersWithoutSubquery) =
+ normalizedFilters.partition(SubqueryExpression.hasSubquery)
+
+ val (pushedFilters, remainingFilters) = PushDownUtils.pushFilters(
Review comment:
Not really, we still want Spark to pass filters but it is up to the data
source to apply them. For example, there may be implementations that apply
filters to partitions but not files within partitions if they can atomically
replace only partitions.
To sum up, I don't anticipate any major changes to the existing pushdown
logic.
--
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]