You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "MaxGekk (via GitHub)" <gi...@apache.org> on 2023/02/08 17:58:52 UTC

[GitHub] [spark] MaxGekk commented on a diff in pull request #39937: [SPARK-42309][SQL] Assign name to _LEGACY_ERROR_TEMP_1204

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