rdblue commented on a change in pull request #3661:
URL: https://github.com/apache/iceberg/pull/3661#discussion_r762620551



##########
File path: 
spark/v3.2/spark-extensions/src/main/scala/org/apache/iceberg/spark/extensions/IcebergSparkSessionExtensions.scala
##########
@@ -35,9 +42,16 @@ class IcebergSparkSessionExtensions extends 
(SparkSessionExtensions => Unit) {
     // analyzer extensions
     extensions.injectResolutionRule { spark => ResolveProcedures(spark) }
     extensions.injectResolutionRule { _ => ProcedureArgumentCoercion }
+    extensions.injectResolutionRule { _ => RewriteDeleteFromTable }
 
     // optimizer extensions
+    extensions.injectOptimizerRule { _ => 
ExtendedSimplifyConditionalsInPredicate }
+    extensions.injectOptimizerRule { _ => 
ExtendedReplaceNullWithFalseInPredicate }
+    extensions.injectPreCBORule { _ => OptimizeMetadataOnlyDeleteFromTable }

Review comment:
       I think that this works because the pre-CBO rules are executed once, so 
order matters. Adding the conversion to metadata delete before replacing the 
plan with the `ReplaceData` is important. Could you add a comment that notes 
this?




-- 
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]

Reply via email to