aokolnychyi commented on a change in pull request #33008:
URL: https://github.com/apache/spark/pull/33008#discussion_r658349804
##########
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:
Here I only care about filters that can be pushed into the source.
Do you have a PR for refactoring at hand, @huaxingao?
--
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]