karenfeng commented on a change in pull request #33863:
URL: https://github.com/apache/spark/pull/33863#discussion_r710556127
##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -55,7 +83,12 @@
"sqlState" : "22023"
},
"INVALID_JSON_SCHEMA_MAPTYPE" : {
- "message" : [ "Input schema %s can only contain StringType as a key type
for a MapType." ]
+ "message" : [ "Input schema %s can only contain StringType as a key type
for a MapType." ],
+ "sqlState" : "42000"
+ },
+ "METHOD_NOT_DECLARED" : {
Review comment:
I don't think this is used? It's also already defined as
`MISSING_METHOD`.
##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -21,6 +37,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" : "42000"
Review comment:
22005 may be a better fit here.
##########
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"
Review comment:
This looks like an internal error, let's remove the SQLSTATE.
##########
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" : {
Review comment:
`NOT_EXPECTED_UNRESOLVED_ENCODER` -> `UNEXPECTED_UNRESOLVED_ENCODER`
##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -55,7 +83,12 @@
"sqlState" : "22023"
},
"INVALID_JSON_SCHEMA_MAPTYPE" : {
Review comment:
While we're here, can you also update: `INVALID_JSON_SCHEMA_MAPTYPE` ->
`INVALID_JSON_MAP_KEY_TYPE`? The original class name is not very descriptive.
##########
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"
Review comment:
This looks like an internal error, let's remove the SQLSTATE.
##########
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" : {
+ "message" : [ "Can not handle nested schema... plan %s" ],
+ "sqlState" : "42000"
+ },
"SECOND_FUNCTION_ARGUMENT_NOT_INTEGER" : {
"message" : [ "The second argument of '%s' function needs to be an
integer." ],
"sqlState" : "22023"
},
"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"
+ },
+ "UNREACHABLE" : {
Review comment:
`UNREACHABLE` -> `REACHED_UNREACHABLE_LINE` - we should provide more
detail
##########
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:
This looks like an internal error, let's remove the SQLSTATE.
##########
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:
`RESOLVE_CANNOT_HANDLE_NESTED_SCHEMA` -> `CANNOT_RESOLVE_NESTED_SCHEMA`
##########
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" : {
Review comment:
`NOT_OVERRIDE_EXPECTED_METHODS` -> `EXPECTED_METHODS_NOT_OVERRIDDEN`
##########
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" : {
+ "message" : [ "Can not handle nested schema... plan %s" ],
+ "sqlState" : "42000"
+ },
"SECOND_FUNCTION_ARGUMENT_NOT_INTEGER" : {
"message" : [ "The second argument of '%s' function needs to be an
integer." ],
"sqlState" : "22023"
},
"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"
+ },
+ "UNREACHABLE" : {
+ "message" : [ "This line should be unreachable %s" ],
+ "sqlState" : "42000"
+ },
"UNRECOGNIZED_SQL_TYPE" : {
"message" : [ "Unrecognized SQL type %s" ],
"sqlState" : "42000"
},
+ "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_OPERATION_NOT_RESOLVED" : {
Review comment:
`UNSUPPORTED_OPERATION_NOT_RESOLVED` -> `NOT_RESOLVED`
##########
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" : {
+ "message" : [ "Can not handle nested schema... plan %s" ],
+ "sqlState" : "42000"
Review comment:
This looks like an internal error, let's remove the SQLSTATE.
##########
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" : {
+ "message" : [ "Can not handle nested schema... plan %s" ],
+ "sqlState" : "42000"
+ },
"SECOND_FUNCTION_ARGUMENT_NOT_INTEGER" : {
"message" : [ "The second argument of '%s' function needs to be an
integer." ],
"sqlState" : "22023"
},
"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"
+ },
+ "UNREACHABLE" : {
+ "message" : [ "This line should be unreachable %s" ],
+ "sqlState" : "42000"
Review comment:
This looks like an internal error, let's remove the SQLSTATE.
--
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]