You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "dongjoon-hyun (via GitHub)" <gi...@apache.org> on 2023/06/07 04:50:11 UTC

[GitHub] [spark] dongjoon-hyun commented on a diff in pull request #41448: [SPARK-43885][SQL] DataSource V2: Handle MERGE commands for delta-based sources

dongjoon-hyun commented on code in PR #41448:
URL: https://github.com/apache/spark/pull/41448#discussion_r1220838583


##########
core/src/main/resources/error/error-classes.json:
##########
@@ -1513,6 +1513,13 @@
       "Parse Mode: <failFastMode>. To process malformed records as null result, try setting the option 'mode' as 'PERMISSIVE'."
     ]
   },
+  "MERGE_CARDINALITY_VIOLATION" : {
+    "message" : [
+      "The ON search condition of the MERGE statement matched a single row from the target table with multiple rows of the source table.",
+      "This could result in the target row being operated on more than once with an update or delete operation and is not allowed."
+    ],
+    "sqlState" : "23000"

Review Comment:
   Ya, it sounds tricky. As you know, currently we use `23505` for two error cases, `DUPLICATED_MAP_KEY` and `DUPLICATE_KEY`. Just a question, if there is no other reference, do you want to use `23509` like SAP instead?



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org