karenfeng commented on a change in pull request #33864:
URL: https://github.com/apache/spark/pull/33864#discussion_r717860685



##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -110,6 +159,10 @@
     "message" : [ "Unknown static partition column: %s" ],
     "sqlState" : "42000"
   },
+  "NESTED_ARRAYS_UNSUPPORTED" : {

Review comment:
       Let's also make this `UNSUPPORTED_NESTED_ARRAYS`

##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -17,20 +17,41 @@
   "CANNOT_GENERATE_CODE_FOR_EXPRESSION" : {
     "message" : [ "Cannot generate code for expression: %s" ]
   },
+  "CANNOT_GET_JDBC_TYPE" : {
+    "message" : [ "Can't get JDBC type for %s" ]
+  },
+  "CANNOT_OPERATE_ON_CANONICALIZATION_PLAN" : {
+    "message" : [ "Operating on canonicalization plan" ]
+  },
   "CANNOT_PARSE_DECIMAL" : {
     "message" : [ "Cannot parse decimal" ],
     "sqlState" : "42000"
   },
+  "CANNOT_READ_FOOTER_FOR_FILE" : {
+    "message" : [ "Could not read footer for file: %s" ],
+    "sqlState" : "42000"
+  },
   "CANNOT_TERMINATE_GENERATOR" : {
     "message" : [ "Cannot terminate expression: %s" ]
   },
+  "CANNOT_TRANSLATE_NON_NULL_VALUE_FOR_FIELD" : {
+    "message" : [ "Can't translate non-null value for field %s" ]
+  },
   "CAST_CAUSES_OVERFLOW" : {
     "message" : [ "Casting %s to %s causes overflow" ],
     "sqlState" : "22005"
   },
   "CONCURRENT_QUERY" : {
     "message" : [ "Another instance of this query was just started by a 
concurrent session." ]
   },
+  "DATA_TYPE_UNSUPPORTED" : {

Review comment:
       Can you re-use the extant error class `UNSUPPORTED_DATATYPE` here 
instead?

##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -17,20 +17,41 @@
   "CANNOT_GENERATE_CODE_FOR_EXPRESSION" : {
     "message" : [ "Cannot generate code for expression: %s" ]
   },
+  "CANNOT_GET_JDBC_TYPE" : {
+    "message" : [ "Can't get JDBC type for %s" ]
+  },
+  "CANNOT_OPERATE_ON_CANONICALIZATION_PLAN" : {
+    "message" : [ "Operating on canonicalization plan" ]
+  },
   "CANNOT_PARSE_DECIMAL" : {
     "message" : [ "Cannot parse decimal" ],
     "sqlState" : "42000"
   },
+  "CANNOT_READ_FOOTER_FOR_FILE" : {
+    "message" : [ "Could not read footer for file: %s" ],
+    "sqlState" : "42000"
+  },
   "CANNOT_TERMINATE_GENERATOR" : {
     "message" : [ "Cannot terminate expression: %s" ]
   },
+  "CANNOT_TRANSLATE_NON_NULL_VALUE_FOR_FIELD" : {
+    "message" : [ "Can't translate non-null value for field %s" ]
+  },
   "CAST_CAUSES_OVERFLOW" : {
     "message" : [ "Casting %s to %s causes overflow" ],
     "sqlState" : "22005"
   },
   "CONCURRENT_QUERY" : {
     "message" : [ "Another instance of this query was just started by a 
concurrent session." ]
   },
+  "DATA_TYPE_UNSUPPORTED" : {
+    "message" : [ "Data type '%s' is not supported." ],
+    "sqlState" : "0A000"
+  },
+  "DDL_UNSUPPORTED" : {

Review comment:
       To match the existing unsupported operation error class, can you rename 
this to `UNSUPPORTED_DDL`?

##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -39,6 +60,10 @@
     "message" : [ "Found duplicate keys '%s'" ],
     "sqlState" : "23000"
   },
+  "EMPTY_OPTION" : {
+    "message" : [ "Option `%s` can not be empty." ],
+    "sqlState" : "08006"

Review comment:
       Can we use 42000 here instead?

##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -102,6 +147,10 @@
     "message" : [ "cannot resolve '%s' given input columns: [%s]" ],
     "sqlState" : "42000"
   },
+  "MISSING_JDBC_TABLE_NAME_AND_QUERY" : {
+    "message" : [ "Option '%s' or '%s' is required." ],
+    "sqlState" : "22023"

Review comment:
       Let's use 42000 here as well.




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