huaxingao commented on a change in pull request #33008:
URL: https://github.com/apache/spark/pull/33008#discussion_r657312390
##########
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:
I have a question here for filter pushed down (since I am refactoring
this `V2ScanRelationPushDown`). Are the `remainingFilters` going to be applied
to V2Relation?
--
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]