aokolnychyi commented on a change in pull request #35395:
URL: https://github.com/apache/spark/pull/35395#discussion_r813318216
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/planning/patterns.scala
##########
@@ -388,3 +391,62 @@ object ExtractSingleColumnNullAwareAntiJoin extends
JoinSelectionHelper with Pre
case _ => None
}
}
+
+/**
+ * An extractor for operations such as DELETE and MERGE that require rewriting
data.
+ *
+ * This class extracts the following entities:
+ * - the row-level command (such as [[DeleteFromTable]]);
+ * - the read relation in the rewrite plan that can be either
[[DataSourceV2Relation]] or
+ * [[DataSourceV2ScanRelation]] depending on whether the planning has already
happened;
+ * - the current rewrite plan.
Review comment:
I kept the minimum required logic for group-based deletes for now. You
are right, this extractor will change to support UPDATE and delta-based
sources. What about updating the description once we make those changes? For
now, there will be exactly one read relation.
--
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]