MaxGekk commented on code in PR #39937:
URL: https://github.com/apache/spark/pull/39937#discussion_r1100495181


##########
core/src/main/resources/error/error-classes.json:
##########
@@ -116,6 +116,12 @@
       "<details>"
     ]
   },
+  "CANNOT_WRITE_INCOMPATIBLE_DATA_TO_TABLE" : {
+    "message" : [
+      "Cannot write incompatible data to table <tableName>:",
+      "- <errors>."

Review Comment:
   Regarding to the general field `<errors>`. I would prefer to see separate 
errors classes (sub-classes) per every `addError()`:
   - 
https://github.com/apache/spark/blob/df36124636c600937644734f439670cbd35dbdf6/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TableOutputResolver.scala#L80
   - 
https://github.com/apache/spark/blob/df36124636c600937644734f439670cbd35dbdf6/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TableOutputResolver.scala#L83
   - 
https://github.com/apache/spark/blob/df36124636c600937644734f439670cbd35dbdf6/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TableOutputResolver.scala#L117
   - 
https://github.com/apache/spark/blob/df36124636c600937644734f439670cbd35dbdf6/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TableOutputResolver.scala#L135



##########
core/src/main/resources/error/error-classes.json:
##########
@@ -116,6 +116,12 @@
       "<details>"
     ]
   },
+  "CANNOT_WRITE_INCOMPATIBLE_DATA_TO_TABLE" : {

Review Comment:
   Can you make it shorter like `INCOMPATIBLE_DATA ...` 



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