-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-42838][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_2000 #48332
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 14 commits
3a1bac1
3d34080
f8470aa
1e275ee
13ee2b0
b2eec80
a2b9371
468df0d
a8efe0f
84da3d3
58336d2
cdd7e42
6c3ee3d
093cfe4
77dce65
0843220
42f3539
03ef738
d7c176a
fb34be0
2a1f41c
95643bb
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 |
|---|---|---|
|
|
@@ -277,21 +277,22 @@ private[sql] object QueryExecutionErrors extends QueryErrorsBase with ExecutionE | |
| summary = "") | ||
| } | ||
|
|
||
| def ansiDateTimeError(e: Exception): SparkDateTimeException = { | ||
| def ansiDateTimeArgumentOutOfRange(e: Exception): SparkDateTimeException = { | ||
|
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.
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. Let's resolve that ticket first, but keep this one open for now, as I am not sure what complete scope will be of the other ticket and this PRs goal is to remove
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.
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. sgtm |
||
| new SparkDateTimeException( | ||
| errorClass = "_LEGACY_ERROR_TEMP_2000", | ||
| errorClass = "DATETIME_ARGUMENT_OUT_OF_RANGE", | ||
| messageParameters = Map( | ||
| "message" -> e.getMessage, | ||
| "rangeMessage" -> e.getMessage, | ||
| "ansiConfig" -> toSQLConf(SQLConf.ANSI_ENABLED.key)), | ||
| context = Array.empty, | ||
| summary = "") | ||
| } | ||
|
|
||
| def ansiIllegalArgumentError(message: String): SparkIllegalArgumentException = { | ||
| def invalidIntervalWithMicrosecondsError(funcName: String): SparkIllegalArgumentException = { | ||
| new SparkIllegalArgumentException( | ||
| errorClass = "_LEGACY_ERROR_TEMP_2000", | ||
| errorClass = "INVALID_PARAMETER_VALUE.INTERVAL_WITH_MICROSECONDS", | ||
| messageParameters = Map( | ||
| "message" -> message, | ||
| "parameter" -> toSQLId("interval"), | ||
| "functionName" -> toSQLId(funcName), | ||
| "ansiConfig" -> toSQLConf(SQLConf.ANSI_ENABLED.key))) | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -436,9 +436,8 @@ class DateExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper { | |
| withSQLConf((SQLConf.ANSI_ENABLED.key, "true")) { | ||
| checkErrorInExpression[SparkIllegalArgumentException]( | ||
| DateAddInterval(Literal(d), Literal(new CalendarInterval(1, 1, 25 * MICROS_PER_HOUR))), | ||
| "_LEGACY_ERROR_TEMP_2000", | ||
| Map("message" -> | ||
| "Cannot add hours, minutes or seconds, milliseconds, microseconds to a date", | ||
| "INVALID_PARAMETER_VALUE.INTERVAL_WITH_MICROSECONDS", | ||
| Map("parameter" -> "`interval`", "functionName" -> "`dateaddinterval`", | ||
|
||
| "ansiConfig" -> "\"spark.sql.ansi.enabled\"")) | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.