karenfeng commented on a change in pull request #33839:
URL: https://github.com/apache/spark/pull/33839#discussion_r710549567
##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -32,6 +46,14 @@
"GROUPING_SIZE_LIMIT_EXCEEDED" : {
"message" : [ "Grouping sets size cannot be greater than %s" ]
},
+ "GROUP_INDEX_EXCEED_GROUP_COUNT" : {
+ "message" : [ "Regex group count is %s, but the specified group index is
%s" ],
+ "sqlState" : "42000"
+ },
+ "GROUP_INDEX_LESS_THAN_ZERO" : {
+ "message" : [ "The specified group index cannot be less than zero" ],
+ "sqlState" : "07009"
Review comment:
I think 42000 is a better fit here as well.
##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -77,6 +111,14 @@
"message" : [ "PARTITION clause cannot contain a non-partition column
name: %s" ],
"sqlState" : "42000"
},
+ "NOT_MATCH_FUNCTION_NAME" : {
Review comment:
This doesn't make much sense grammatically. How about
`ADD_NEW_FUNCTION_NAME_MISMATCHED`?
##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -89,17 +131,40 @@
"message" : [ "The second argument of '%s' function needs to be an
integer." ],
"sqlState" : "22023"
},
+ "SHOULD_NOT_CALL_ALIAS_DO_GEN_CODE" : {
+ "message" : [ "Alias.doGenCode should not be called." ]
+ },
+ "SUM_OF_DECIMAL_OVERFLOW" : {
+ "message" : [ "Overflow in sum of decimals." ],
+ "sqlState" : "22003"
+ },
"UNABLE_TO_ACQUIRE_MEMORY" : {
"message" : [ "Unable to acquire %s bytes of memory, got %s" ]
},
+ "UNEXPECTED_TYPE" : {
+ "message" : [ "Unexpected type %s" ],
+ "sqlState" : "42000"
+ },
"UNRECOGNIZED_SQL_TYPE" : {
"message" : [ "Unrecognized SQL type %s" ],
"sqlState" : "42000"
},
+ "UNSUPPORTED_DATATYPE" : {
+ "message" : [ "dataType" ],
+ "sqlState" : "0A000"
+ },
+ "UNSUPPORTED_INPUT_TYPE" : {
+ "message" : [ "Unsupported input type %s" ],
+ "sqlState" : "0A000"
+ },
"UNSUPPORTED_LITERAL_TYPE" : {
"message" : [ "Unsupported literal type %s %s" ],
"sqlState" : "0A000"
},
+ "UNSUPPORTED_ORDERED_OPERATIONS" : {
Review comment:
This should be more specific, like
`ORDERED_OPERATIONS_UNSUPPORTED_BY_DATA_TYPE`
##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -46,6 +68,10 @@
"message" : [ "Index %s must be between 0 and the length of the
ArrayData." ],
"sqlState" : "22023"
},
+ "INTEGRAL_DIVIDE_OVERFLOW" : {
+ "message" : [ "Overflow in integral divide." ],
+ "sqlState" : "22015"
Review comment:
I think `22003` is a better fit here.
##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -14,13 +21,20 @@
"message" : [ "Found duplicate keys '%s'" ],
"sqlState" : "23000"
},
+ "EXCEED_ARRAY_SIZE_WHEN_ZIP_MAP" : {
Review comment:
This doesn't make much sense grammatically. How about
`ZIPPED_MAPS_EXCEED_SIZE_LIMIT`?
##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -77,6 +111,14 @@
"message" : [ "PARTITION clause cannot contain a non-partition column
name: %s" ],
"sqlState" : "42000"
},
+ "NOT_MATCH_FUNCTION_NAME" : {
+ "message" : [ "%s is not matched at addNewFunction" ],
+ "sqlState" : "42000"
Review comment:
This is an internal error, let's remove the SQLSTATE.
##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -14,13 +21,20 @@
"message" : [ "Found duplicate keys '%s'" ],
"sqlState" : "23000"
},
+ "EXCEED_ARRAY_SIZE_WHEN_ZIP_MAP" : {
+ "message" : [ "Unsuccessful try to zip maps with %s unique keys due to
exceeding the array size limit %s." ]
+ },
"FAILED_RENAME_PATH" : {
"message" : [ "Failed to rename %s to %s as destination already exists" ],
"sqlState" : "22023"
},
"FAILED_SET_ORIGINAL_PERMISSION_BACK" : {
"message" : [ "Failed to set original permission %s back to the created
path: %s. Exception: %s" ]
},
+ "FOUND_NEGATIVE_VALUES" : {
Review comment:
I think `UNEXPECTED_NEGATIVE_VALUES` is a better descriptor.
##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -89,17 +131,40 @@
"message" : [ "The second argument of '%s' function needs to be an
integer." ],
"sqlState" : "22023"
},
+ "SHOULD_NOT_CALL_ALIAS_DO_GEN_CODE" : {
+ "message" : [ "Alias.doGenCode should not be called." ]
+ },
+ "SUM_OF_DECIMAL_OVERFLOW" : {
+ "message" : [ "Overflow in sum of decimals." ],
+ "sqlState" : "22003"
+ },
"UNABLE_TO_ACQUIRE_MEMORY" : {
"message" : [ "Unable to acquire %s bytes of memory, got %s" ]
},
+ "UNEXPECTED_TYPE" : {
+ "message" : [ "Unexpected type %s" ],
+ "sqlState" : "42000"
+ },
"UNRECOGNIZED_SQL_TYPE" : {
"message" : [ "Unrecognized SQL type %s" ],
"sqlState" : "42000"
},
+ "UNSUPPORTED_DATATYPE" : {
Review comment:
Nit: `DATATYPE` -> `DATA_TYPE`.
##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -3,9 +3,16 @@
"message" : [ "Field name %s is ambiguous and has %s matching fields in
the struct." ],
"sqlState" : "42000"
},
+ "CANNOT_GENERATE_CODE_FOR_UNCOMPARABLE_TYPE" : {
+ "message" : [ "cannot generate %s code for un-comparable type: %s" ],
+ "sqlState" : "0A000"
+ },
"CONCURRENT_QUERY" : {
"message" : [ "Another instance of this query was just started by a
concurrent session." ]
},
+ "COPY_NULL_FIELD" : {
Review comment:
I think `COPY_NULL_FIELD_NOT_ALLOWED` is a better descriptor.
--
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]