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

[GitHub] [spark] itholic commented on a diff in pull request #39937: [SPARK-42309][SQL] Introduce `INCOMPATIBLE_DATA_TO_TABLE` and sub classes.

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


##########
core/src/main/resources/error/error-classes.json:
##########
@@ -651,6 +651,58 @@
       "Detected an incompatible DataSourceRegister. Please remove the incompatible library from classpath or upgrade it. Error: <message>"
     ]
   },
+  "INCOMPATIBLE_DATA_TO_TABLE" : {
+    "message" : [
+      "Cannot write incompatible data to table <tableName>:"
+    ],
+    "subClass" : {
+      "AMBIGUOUS_COLUMN_NAME" : {
+        "message" : [
+          "Ambiguous column name in the input data: <colPath>."
+        ]
+      },
+      "CANNOT_FIND_DATA" : {
+        "message" : [
+          "Cannot find data for output column <colPath>."
+        ]
+      },
+      "CANNOT_SAFELY_CAST" : {
+        "message" : [
+          "Cannot safely cast <colPath>: <from> to <to>."
+        ]
+      },
+      "EXTRA_STRUCT_FIELDS" : {
+        "message" : [
+          "Cannot write extra fields to struct <colPath>: <extraCols>."
+        ]
+      },
+      "NULLABLE_ARRAY_ELEMENTS" : {
+        "message" : [
+          "Cannot write nullable elements to array of non-nulls: <colPath>."
+        ]
+      },
+      "NULLABLE_COLUMN" : {
+        "message" : [
+          "Cannot write nullable values to non-null column <colPath>."
+        ]
+      },
+      "NULLABLE_MAP_VALUES" : {
+        "message" : [
+          "Cannot write nullable elements to array of non-nulls: <colPath>."
+        ]
+      },
+      "STRUCT_MISSING_FIELDS" : {
+        "message" : [
+          "Struct <colPath> missing fields: <missingFields>."
+        ]
+      },
+      "UNEXPECTED_COLUMN_NAME" : {
+        "message" : [
+          "Struct <colPath> <order>-th field name does not match (may be out of order): expected <expected>, found <found>."
+        ]
+      }
+    }

Review Comment:
   Thanks for the review! Just applied the comments.



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