-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-40663][SQL](Final) Migrate execution errors onto error classes #38177
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 7 commits
600ff76
17a84a9
72a6f55
ffbb2a6
679eb91
e6493ba
0d77e7e
f079f0b
db7967d
dcb2cb2
0bf202e
a70608d
1c52bee
7dc3cb6
0b1abdd
e692011
9b2ff65
aa24874
2875329
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 |
|---|---|---|
|
|
@@ -4245,5 +4245,40 @@ | |
| "message" : [ | ||
| "Not enough memory to build and broadcast the table to all worker nodes. As a workaround, you can either disable broadcast by setting <autoBroadcastjoinThreshold> to -1 or increase the spark driver memory by setting <driverMemory> to a higher value<analyzeTblMsg>" | ||
| ] | ||
| }, | ||
| "_LEGACY_ERROR_TEMP_2276" : { | ||
| "message" : [ | ||
| "Hive table <tableName> with ANSI intervals is not supported" | ||
| ] | ||
| }, | ||
| "_LEGACY_ERROR_TEMP_2277" : { | ||
| "message" : [ | ||
| "Number of dynamic partitions created is <numWrittenParts>\", which is more than <maxDynamicPartitions>\". To solve this try to set <maxDynamicPartitionsKey> to at least <numWrittenParts>." | ||
| ] | ||
| }, | ||
| "_LEGACY_ERROR_TEMP_2278" : { | ||
| "message" : [ | ||
| "The input $valueType '<input>' does not match the given number format: '<format>'" | ||
|
||
| ] | ||
| }, | ||
| "_LEGACY_ERROR_TEMP_2279" : { | ||
| "message" : [ | ||
| "Multiple bucket transforms are not supported." | ||
| ] | ||
| }, | ||
| "_LEGACY_ERROR_TEMP_2280" : { | ||
| "message" : [ | ||
| "Create namespace comment is not supported" | ||
| ] | ||
| }, | ||
| "_LEGACY_ERROR_TEMP_2281" : { | ||
| "message" : [ | ||
| "Remove namespace comment is not supported" | ||
| ] | ||
| }, | ||
| "_LEGACY_ERROR_TEMP_2282" : { | ||
| "message" : [ | ||
| "Drop namespace restrict is not supported" | ||
| ] | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2554,8 +2554,10 @@ private[sql] object QueryExecutionErrors extends QueryErrorsBase { | |
| "expected" -> s"Detail message: $detailMessage")) | ||
| } | ||
|
|
||
| def hiveTableWithAnsiIntervalsError(tableName: String): Throwable = { | ||
| new UnsupportedOperationException(s"Hive table $tableName with ANSI intervals is not supported") | ||
| def hiveTableWithAnsiIntervalsError(tableName: String): SparkUnsupportedOperationException = { | ||
| new SparkUnsupportedOperationException( | ||
| errorClass = "_LEGACY_ERROR_TEMP_2276", | ||
| messageParameters = Map("tableName" -> tableName)) | ||
| } | ||
|
|
||
| def cannotConvertOrcTimestampToTimestampNTZError(): Throwable = { | ||
|
|
@@ -2579,31 +2581,46 @@ private[sql] object QueryExecutionErrors extends QueryErrorsBase { | |
| maxDynamicPartitions: Int, | ||
| maxDynamicPartitionsKey: String): Throwable = { | ||
| new SparkException( | ||
| s"Number of dynamic partitions created is $numWrittenParts" + | ||
| s", which is more than $maxDynamicPartitions" + | ||
| s". To solve this try to set $maxDynamicPartitionsKey" + | ||
| s" to at least $numWrittenParts.") | ||
| errorClass = "_LEGACY_ERROR_TEMP_2277", | ||
| messageParameters = Map( | ||
| "numWrittenParts" -> numWrittenParts.toString(), | ||
| "maxDynamicPartitionsKey" -> maxDynamicPartitionsKey, | ||
| "maxDynamicPartitions" -> maxDynamicPartitions.toString(), | ||
| "numWrittenParts" -> numWrittenParts.toString()), | ||
| cause = null) | ||
| } | ||
|
|
||
| def invalidNumberFormatError(valueType: String, input: String, format: String): Throwable = { | ||
| new IllegalArgumentException( | ||
| s"The input $valueType '$input' does not match the given number format: '$format'") | ||
| def invalidNumberFormatError( | ||
| valueType: String, input: String, format: String): SparkIllegalArgumentException = { | ||
| new SparkIllegalArgumentException( | ||
| errorClass = "_LEGACY_ERROR_TEMP_2278", | ||
| messageParameters = Map( | ||
| "input" -> input, | ||
| "format" -> format)) | ||
|
Comment on lines
+2622
to
+2623
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. Missed
Contributor
Author
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. Oops, I missed it... Thanks for figuring out! |
||
| } | ||
|
|
||
| def multipleBucketTransformsError(): Throwable = { | ||
| new UnsupportedOperationException("Multiple bucket transforms are not supported.") | ||
| def multipleBucketTransformsError(): SparkUnsupportedOperationException = { | ||
| new SparkUnsupportedOperationException( | ||
| errorClass = "_LEGACY_ERROR_TEMP_2279", | ||
| messageParameters = Map.empty) | ||
| } | ||
|
|
||
| def unsupportedCreateNamespaceCommentError(): Throwable = { | ||
| new SQLFeatureNotSupportedException("Create namespace comment is not supported") | ||
| def unsupportedCreateNamespaceCommentError(): SparkSQLFeatureNotSupportedException = { | ||
| new SparkSQLFeatureNotSupportedException( | ||
| errorClass = "_LEGACY_ERROR_TEMP_2280", | ||
| messageParameters = Map.empty) | ||
| } | ||
|
|
||
| def unsupportedRemoveNamespaceCommentError(): Throwable = { | ||
| new SQLFeatureNotSupportedException("Remove namespace comment is not supported") | ||
| def unsupportedRemoveNamespaceCommentError(): SparkSQLFeatureNotSupportedException = { | ||
| new SparkSQLFeatureNotSupportedException( | ||
| errorClass = "_LEGACY_ERROR_TEMP_2281", | ||
| messageParameters = Map.empty) | ||
| } | ||
|
|
||
| def unsupportedDropNamespaceRestrictError(): Throwable = { | ||
| new SQLFeatureNotSupportedException("Drop namespace restrict is not supported") | ||
| def unsupportedDropNamespaceRestrictError(): SparkSQLFeatureNotSupportedException = { | ||
| new SparkSQLFeatureNotSupportedException( | ||
| errorClass = "_LEGACY_ERROR_TEMP_2282", | ||
| messageParameters = Map.empty) | ||
| } | ||
|
|
||
| def timestampAddOverflowError(micros: Long, amount: Int, unit: String): ArithmeticException = { | ||
|
|
||
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.
Could you remove " around
\", which is more than <maxDynamicPartitions>\"