You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/01/15 23:49:25 UTC

[GitHub] [iceberg] aokolnychyi commented on a change in pull request #2095: Create a base trait for row level operations - Foundational work for MERGE INTO

aokolnychyi commented on a change in pull request #2095:
URL: https://github.com/apache/iceberg/pull/2095#discussion_r558682025



##########
File path: spark3-extensions/src/main/scala/org/apache/spark/sql/catalyst/optimizer/RewriteDelete.scala
##########
@@ -87,35 +68,8 @@ object RewriteDelete extends Rule[LogicalPlan] with PredicateHelper with Logging
       ReplaceData(r, mergeWrite, writePlan)
   }
 
-  private def buildScanPlan(
-      table: Table,
-      output: Seq[AttributeReference],
-      mergeBuilder: MergeBuilder,
-      cond: Expression): LogicalPlan = {
-
-    val scanBuilder = mergeBuilder.asScanBuilder
-
-    val predicates = splitConjunctivePredicates(cond)
-    val normalizedPredicates = DataSourceStrategy.normalizeExprs(predicates, output)
-    PushDownUtils.pushFilters(scanBuilder, normalizedPredicates)
-
-    val scan = scanBuilder.build()
-    val scanRelation = DataSourceV2ScanRelation(table, scan, toOutputAttrs(scan.readSchema(), output))
-
-    scan match {
-      case filterable: SupportsFileFilter =>
-        val matchingFilePlan = buildFileFilterPlan(cond, scanRelation)
-        val dynamicFileFilter = DynamicFileFilter(scanRelation, matchingFilePlan, filterable)
-        dynamicFileFilter
-      case _ =>
-        scanRelation
-    }
-  }
-
-  private def buildWritePlan(
-      remainingRowsPlan: LogicalPlan,
-      output: Seq[AttributeReference]): LogicalPlan = {
-
+  private def buildWritePlan(remainingRowsPlan: LogicalPlan,
+                             output: Seq[AttributeReference]): LogicalPlan = {

Review comment:
       Are these cosmetic changes needed?




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org