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



##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -137,6 +187,13 @@
   "UNABLE_TO_ACQUIRE_MEMORY" : {
     "message" : [ "Unable to acquire %s bytes of memory, got %s" ]
   },
+  "UNEXPECTED_OPERATOR_IN_CORRELATED_SUBQUERY" : {
+    "message" : [ "Unexpected operator %s in correlated subquery %s" ],
+    "sqlState" : "42000"
+  },
+  "UNEXPECTED_UNRESOLVED_ENCODER" : {

Review comment:
       Whoops, I meant: UNEXPECTED_UNRESOLVED_ENCODER -> 
EXPECTED_UNRESOLVED_ENCODER

##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -77,29 +110,73 @@
     "message" : [ "PARTITION clause cannot contain a non-partition column 
name: %s" ],
     "sqlState" : "42000"
   },
+  "NOT_EXPECTED_UNRESOLVED_ENCODER" : {
+    "message" : [ "Unresolved encoder expected, but %s was found." ],
+    "sqlState" : "42000"
+  },
+  "NOT_OVERRIDE_EXPECTED_METHODS" : {
+    "message" : [ "%s must override either %s or %s" ],
+    "sqlState" : "42000"
+  },
+  "NULL_AS_MAP_KEY_NOT_ALLOWED" : {
+    "message" : [ "Cannot use null as map key!" ],
+    "sqlState" : "42000"
+  },
   "PIVOT_VALUE_DATA_TYPE_MISMATCH" : {
     "message" : [ "Invalid pivot value '%s': value data type %s does not match 
pivot column data type %s" ],
     "sqlState" : "42000"
   },
+  "PRIMARY_CONSTRUCTOR_NOT_FOUND" : {
+    "message" : [ "Couldn't find a primary constructor on %s" ],
+    "sqlState" : "42000"
+  },
   "RENAME_SRC_PATH_NOT_FOUND" : {
     "message" : [ "Failed to rename as %s was not found" ],
     "sqlState" : "22023"
   },
+  "RESOLVE_CANNOT_HANDLE_NESTED_SCHEMA" : {

Review comment:
       Bump

##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -17,6 +17,14 @@
   "CANNOT_GENERATE_CODE_FOR_EXPRESSION" : {
     "message" : [ "Cannot generate code for expression: %s" ]
   },
+  "CANNOT_GENERATE_CODE_FOR_UNSUPPORTED_TYPE" : {
+    "message" : [ "Cannot generate code for unsupported type: %s" ],
+    "sqlState" : "42000"

Review comment:
       This should be 0A000 (unsupported)

##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -77,29 +110,73 @@
     "message" : [ "PARTITION clause cannot contain a non-partition column 
name: %s" ],
     "sqlState" : "42000"
   },
+  "NOT_EXPECTED_UNRESOLVED_ENCODER" : {
+    "message" : [ "Unresolved encoder expected, but %s was found." ],
+    "sqlState" : "42000"
+  },
+  "NOT_OVERRIDE_EXPECTED_METHODS" : {
+    "message" : [ "%s must override either %s or %s" ],
+    "sqlState" : "42000"
+  },
+  "NULL_AS_MAP_KEY_NOT_ALLOWED" : {
+    "message" : [ "Cannot use null as map key!" ],
+    "sqlState" : "42000"
+  },
   "PIVOT_VALUE_DATA_TYPE_MISMATCH" : {
     "message" : [ "Invalid pivot value '%s': value data type %s does not match 
pivot column data type %s" ],
     "sqlState" : "42000"
   },
+  "PRIMARY_CONSTRUCTOR_NOT_FOUND" : {
+    "message" : [ "Couldn't find a primary constructor on %s" ],
+    "sqlState" : "42000"

Review comment:
       Bump!

##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -49,6 +68,14 @@
   "FAILED_SET_ORIGINAL_PERMISSION_BACK" : {
     "message" : [ "Failed to set original permission %s back to the created 
path: %s. Exception: %s" ]
   },
+  "FAILED_TO_CONVERT_VALUE_TO_JSON" : {
+    "message" : [ "Failed to convert value %s (class of %s) with the type of 
%s to JSON." ],
+    "sqlState" : "22005"
+  },
+  "FIELD_CANNOT_BE_NULL" : {

Review comment:
       Let's make this more specific: `ROW_FIELD_CANNOT_BE_NULL`

##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -149,10 +206,22 @@
     "message" : [ "Unsupported data type %s" ],
     "sqlState" : "0A000"
   },
+  "UNSUPPORTED_ENCODER" : {
+    "message" : [ "Only expression encoders are supported." ],
+    "sqlState" : "0A000"
+  },
   "UNSUPPORTED_LITERAL_TYPE" : {
     "message" : [ "Unsupported literal type %s %s" ],
     "sqlState" : "0A000"
   },
+  "UNSUPPORTED_NATURAL_JOIN_TYPE" : {
+    "message" : [ "Unsupported natural join type %s" ],
+    "sqlState" : "0A000"
+  },
+  "UNSUPPORTED_ROUNDING" : {

Review comment:
       UNSUPPORTED_ROUNDING -> UNSUPPORTED_ROUNDING_MODE

##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -118,14 +150,32 @@
     "message" : [ "PARTITION clause cannot contain a non-partition column 
name: %s" ],
     "sqlState" : "42000"
   },
+  "NOT_RESOLVED" : {

Review comment:
       In retrospect, this is specific to custom collection class resolution. 
Can we make this class name more specific? Eg. 
`CUSTOM_COLLECTION_CLASS_NOT_RESOLVED`




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