longvu-db commented on code in PR #56705:
URL: https://github.com/apache/spark/pull/56705#discussion_r3550370709
##########
sql/catalyst/src/main/java/org/apache/spark/sql/connector/write/RowLevelOperation.java:
##########
@@ -39,7 +39,7 @@ public interface RowLevelOperation {
* @since 3.3.0
*/
enum Command {
- DELETE, UPDATE, MERGE
+ DELETE, UPDATE, MERGE, REPLACE
Review Comment:
Hmm, good point, actually I'm not sure if INSERT_INTO_REPLACE fits here,
INSERT REPLACE USING a grouped-of-rows-based replacement, unlike MERGE INTO
which is a row-based replacement.
Imagine you are partitioned by a certain date, target table has 5 rows of
that date, while source table has 2 rows of that date, then that 5 rows can be
replaced by 2 rows.
Where as MERGE INTO cannot do that, it fails when multiple source rows match
and attempt to update the same target row.
Do we happen to know what's the precise definition of "row-level" here?
--
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]