kbendick commented on a change in pull request #3661:
URL: https://github.com/apache/iceberg/pull/3661#discussion_r762675350
##########
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:
+1 for adding a comment about why certain rules are added and their
"preconditions" and associated "co-conditions" (even if it's Spark
functionality we're relying on).
It's very helpful to others who aren't as aware of Spark plan resolution and
allows more people to effectively review and contribute in this area of the
codebase.
Particularly here where we're relying on order of operations for something
that could possibly silently fail / misbehave if accidentally changed.
--
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]