forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-47255][SQL] Assign names to the error classes _LEGACY_ERROR_TE…
…MP_323[6-7] and _LEGACY_ERROR_TEMP_324[7-9] ### What changes were proposed in this pull request? In the PR, I propose to assign the proper names to the legacy error classes _LEGACY_ERROR_TEMP_323[6-7] and _LEGACY_ERROR_TEMP_324[7-9], and modify tests in testing suites to reflect these changes and use checkError() function. Also this PR improves the error messages. ### Why are the changes needed? Proper name improves user experience w/ Spark SQL. ### Does this PR introduce _any_ user-facing change? Yes, the PR changes an user-facing error message. ### How was this patch tested? Error _LEGACY_ERROR_TEMP_3249 is tested by running the modified test suite: `$ build/sbt "catalyst/testOnly *RowJsonSuite"` Errors _LEGACY_ERROR_TEMP_323[6-7] and _LEGACY_ERROR_TEMP_324[7-8] are tested by running the modified test suite: `$ build/sbt "catalyst/testOnly *CSVExprUtilsSuite"` Golden files are regenerated using the: `$ SPARK_GENERATE_GOLDEN_FILES=1` `$ build/sbt "core/testOnly *SparkThrowableSuite"` ### Was this patch authored or co-authored using generative AI tooling? No Closes apache#45423 from miland-db/miland-db/miland-legacy-error-class. Authored-by: Milan Dankovic <milan.dankovic@databricks.com> Signed-off-by: Max Gekk <max.gekk@gmail.com>
- Loading branch information
Showing
7 changed files
with
123 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
docs/sql-error-conditions-invalid-delimiter-value-error-class.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>`. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters