Skip to content

Commit

Permalink
Add sqlState codes and regenerate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
miland-db committed Mar 11, 2024
1 parent e1c4cb5 commit 44ab7e5
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 32 deletions.
66 changes: 34 additions & 32 deletions common/utils/src/main/resources/error/error-classes.json
Original file line number Diff line number Diff line change
Expand Up @@ -1277,6 +1277,12 @@
],
"sqlState" : "58030"
},
"FAILED_ROW_TO_JSON" : {
"message" : [
"Failed to convert the row value <value> of the class <class> to the target SQL type <sqlType> in the JSON format."
],
"sqlState" : "2203G"
},
"FIELDS_ALREADY_EXISTS" : {
"message" : [
"Cannot <op> column, because <fieldNames> already exists in <struct>."
Expand Down Expand Up @@ -1862,6 +1868,34 @@
},
"sqlState" : "42623"
},
"INVALID_DELIMITER_VALUE" : {
"message" : [
"Invalid value for delimiter."
],
"subClass" : {
"DELIMITER_LONGER_THAN_EXPECTED" : {
"message" : [
"Delimiter cannot be more than one character: <str>."
]
},
"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."
]
},
"UNSUPPORTED_SPECIAL_CHARACTER" : {
"message" : [
"Unsupported special character for delimiter: <str>."
]
}
},
"sqlState" : "42602"
},
"INVALID_DRIVER_MEMORY" : {
"message" : [
"System memory <systemMemory> must be at least <minSystemMemory>.",
Expand Down Expand Up @@ -7812,38 +7846,6 @@
"Failed to parse a value for data type <dataType>."
]
},
"INVALID_DELIMITER_VALUE" : {
"message" : [
"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."
]
},
"UNSUPPORTED_SPECIAL_CHARACTER" : {
"message" : [
"Unsupported special character for delimiter: <str>."
]
},
"DELIMITER_LONGER_THAN_EXPECTED" : {
"message" : [
"Delimiter cannot be more than one character: <str>."
]
}
}
},
"FAILED_ROW_TO_JSON" : {
"message" : [
"Failed to convert the row value <value> of the class <class> to the target SQL type <sqlType> in the JSON format."
]
},
"_LEGACY_ERROR_TEMP_3250" : {
"message" : [
"Failed to convert the JSON string '<other>' to a field."
Expand Down
49 changes: 49 additions & 0 deletions docs/sql-error-conditions-invalid-delimiter-value-error-class.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
layout: global
title: INVALID_DELIMITER_VALUE error class
displayTitle: INVALID_DELIMITER_VALUE error class
license: |
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
---

<!--
DO NOT EDIT THIS FILE.
It was generated automatically by `org.apache.spark.SparkThrowableSuite`.
-->

[SQLSTATE: 42602](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation)

Invalid value for delimiter.

This error class has the following derived error classes:

## DELIMITER_LONGER_THAN_EXPECTED

Delimiter cannot be more than one character: `<str>`.

## EMPTY_STRING

Delimiter cannot be empty string.

## SINGLE_BACKSLASH

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.

## UNSUPPORTED_SPECIAL_CHARACTER

Unsupported special character for delimiter: `<str>`.


14 changes: 14 additions & 0 deletions docs/sql-error-conditions.md
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,12 @@ SQLSTATE: 58030

Failed to rename temp file `<srcPath>` to `<dstPath>` as FileSystem.rename returned false.

### FAILED_ROW_TO_JSON

[SQLSTATE: 2203G](sql-error-conditions-sqlstates.html#class-22-data-exception)

Failed to convert the row value `<value>` of the class `<class>` to the target SQL type `<sqlType>` in the JSON format.

### FIELDS_ALREADY_EXISTS

[SQLSTATE: 42710](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation)
Expand Down Expand Up @@ -1124,6 +1130,14 @@ Failed to execute `<statement>` command because the destination column or variab

For more details see [INVALID_DEFAULT_VALUE](sql-error-conditions-invalid-default-value-error-class.html)

### [INVALID_DELIMITER_VALUE](sql-error-conditions-invalid-delimiter-value-error-class.html)

[SQLSTATE: 42602](sql-error-conditions-sqlstates.html#class-42-syntax-error-or-access-rule-violation)

Invalid value for delimiter.

For more details see [INVALID_DELIMITER_VALUE](sql-error-conditions-invalid-delimiter-value-error-class.html)

### INVALID_DRIVER_MEMORY

SQLSTATE: F0000
Expand Down

0 comments on commit 44ab7e5

Please sign in to comment.