MaxGekk commented on code in PR #45423:
URL: https://github.com/apache/spark/pull/45423#discussion_r1517818356
##
common/utils/src/main/resources/error/error-classes.json:
##
@@ -7822,20 +7822,34 @@
"Failed to parse a value for data type ."
]
},
- "_LEGACY_ERROR_TEMP_3247" : {
+ "INVALID_DELIMITER_VALUE" : {
"message" : [
- "Delimiter cannot be empty string"
-]
- },
- "_LEGACY_ERROR_TEMP_3248" : {
-"message" : [
- "Single backslash is prohibited. It has special meaning as beginning of
an escape sequence. To get the backslash character, pass a string with two
backslashes as the delimiter."
-]
+ "Invalid value for delimiter"
+],
+"subClass" : {
+ "EMPTY_STRING": {
+"message" : [
+ "Delimiter cannot be empty string"
Review Comment:
```suggestion
"Delimiter cannot be empty string."
```
##
common/utils/src/main/resources/error/error-classes.json:
##
@@ -7822,20 +7822,34 @@
"Failed to parse a value for data type ."
]
},
- "_LEGACY_ERROR_TEMP_3247" : {
+ "INVALID_DELIMITER_VALUE" : {
"message" : [
- "Delimiter cannot be empty string"
-]
- },
- "_LEGACY_ERROR_TEMP_3248" : {
-"message" : [
- "Single backslash is prohibited. It has special meaning as beginning of
an escape sequence. To get the backslash character, pass a string with two
backslashes as the delimiter."
-]
+ "Invalid value for delimiter"
+],
+"subClass" : {
+ "EMPTY_STRING": {
+"message" : [
+ "Delimiter cannot be empty string"
+]
+ },
+ "SINGLE_BACKSLASH": {
+"message" : [
+ "Single backslash is prohibited. It has special meaning as beginning
of an escape sequence. To get the backslash character, pass a string with two
backslashes as the delimiter."
+]
+ }
+}
},
- "_LEGACY_ERROR_TEMP_3249" : {
+ "JSON_CONVERSION_ERROR" : {
Review Comment:
Let's assign more specific name to it: `FAILED_ROW_TO_JSON`
##
common/utils/src/main/resources/error/error-classes.json:
##
@@ -7822,20 +7822,34 @@
"Failed to parse a value for data type ."
]
},
- "_LEGACY_ERROR_TEMP_3247" : {
+ "INVALID_DELIMITER_VALUE" : {
"message" : [
- "Delimiter cannot be empty string"
-]
- },
- "_LEGACY_ERROR_TEMP_3248" : {
-"message" : [
- "Single backslash is prohibited. It has special meaning as beginning of
an escape sequence. To get the backslash character, pass a string with two
backslashes as the delimiter."
-]
+ "Invalid value for delimiter"
+],
+"subClass" : {
+ "EMPTY_STRING": {
+"message" : [
+ "Delimiter cannot be empty string"
+]
+ },
+ "SINGLE_BACKSLASH": {
+"message" : [
+ "Single backslash is prohibited. It has special meaning as beginning
of an escape sequence. To get the backslash character, pass a string with two
backslashes as the delimiter."
+]
+ }
+}
},
- "_LEGACY_ERROR_TEMP_3249" : {
+ "JSON_CONVERSION_ERROR" : {
"message" : [
- "Failed to convert value (class of }) with the type
of to JSON."
-]
+ "Invalid JSON conversion."
+],
+"subClass" : {
+ "UNSUPPORTED_VALUE_TYPE" : {
+"message" : [
+ "Failed to convert value (class of }) with the
type of to JSON."
Review Comment:
```suggestion
"Failed to convert the row value of the class to
the target SQL type in the JSON format."
```
##
common/utils/src/main/resources/error/error-classes.json:
##
@@ -7822,20 +7822,34 @@
"Failed to parse a value for data type ."
]
},
- "_LEGACY_ERROR_TEMP_3247" : {
+ "INVALID_DELIMITER_VALUE" : {
"message" : [
- "Delimiter cannot be empty string"
-]
- },
- "_LEGACY_ERROR_TEMP_3248" : {
-"message" : [
- "Single backslash is prohibited. It has special meaning as beginning of
an escape sequence. To get the backslash character, pass a string with two
backslashes as the delimiter."
-]
+ "Invalid value for delimiter"
Review Comment:
```suggestion
"Invalid value for delimiter."
```
##
common/utils/src/main/resources/error/error-classes.json:
##
@@ -7822,20 +7822,34 @@
"Failed to parse a value for data type ."
]
},
- "_LEGACY_ERROR_TEMP_3247" : {
+ "INVALID_DELIMITER_VALUE" : {
"message" : [
- "Delimiter cannot be empty string"
-]
- },
- "_LEGACY_ERROR_TEMP_3248" : {
-"message" : [
- "Single backslash is prohibited. It has special meaning as beginning of
an escape sequence. To get the backslash character, pass a string with two
backslashes as the delimiter."
-]
+ "Invalid value for delimiter"
+],
+"subClass" : {
+ "EMPTY_STRING": {
+"message" : [
+ "Delimiter cannot be empty string"
+]
+