-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-41181][SQL] Migrate the map options errors onto error classes #38730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
d23e7d4
22662ee
4fef9fd
3c28cd8
677b977
8becd41
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -730,6 +730,23 @@ | |||||
| "The <joinType> JOIN with LATERAL correlation is not allowed because an OUTER subquery cannot correlate to its join partner. Remove the LATERAL correlation or use an INNER JOIN, or LEFT OUTER JOIN instead." | ||||||
| ] | ||||||
| }, | ||||||
| "INVALID_OPTIONS" : { | ||||||
| "message" : [ | ||||||
| "Invalid options:" | ||||||
| ], | ||||||
| "subClass" : { | ||||||
| "NON_STRING_TYPE" : { | ||||||
| "message" : [ | ||||||
| "A type of keys and values in map() must be string, but got <map>." | ||||||
| ] | ||||||
| }, | ||||||
| "NOT_MAP_FUNCTION" : { | ||||||
|
||||||
| "message" : [ | ||||||
| "Must use a map() function for options." | ||||||
|
||||||
| "Must use a map() function for options." | |
| "Must use the `map()` function for options." |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1013,13 +1013,13 @@ private[sql] object QueryCompilationErrors extends QueryErrorsBase { | |
|
|
||
| def keyValueInMapNotStringError(m: CreateMap): Throwable = { | ||
| new AnalysisException( | ||
| errorClass = "_LEGACY_ERROR_TEMP_1095", | ||
| messageParameters = Map("map" -> m.dataType.catalogString)) | ||
| errorClass = "INVALID_OPTIONS.NON_STRING_TYPE", | ||
| messageParameters = Map("map" -> toSQLType(m.dataType))) | ||
| } | ||
|
|
||
| def nonMapFunctionNotAllowedError(): Throwable = { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Be sure the names are consistent. not or non |
||
| new AnalysisException( | ||
| errorClass = "_LEGACY_ERROR_TEMP_1096", | ||
| errorClass = "INVALID_OPTIONS.NOT_MAP_FUNCTION", | ||
| messageParameters = Map.empty) | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
map->mapType