-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[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
[SPARK-42838][SQL] Assign a name to the error class _LEGACY_ERROR_TEMP_2000 #48332
Conversation
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala
Outdated
Show resolved
Hide resolved
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| def ansiDateTimeError(e: Exception): SparkDateTimeException = { | ||
| def ansiDateTimeArgumentOutOfRange(e: Exception): SparkDateTimeException = { |
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.
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.
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 _LEGACY_ERROR_TEMP_2000 completely.
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.
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.
sgtm
MaxGekk
left a comment
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.
| Map("message" -> | ||
| "Cannot add hours, minutes or seconds, milliseconds, microseconds to a date", | ||
| "INVALID_PARAMETER_VALUE.INTERVAL_WITH_MICROSECONDS", | ||
| Map("parameter" -> "`interval`", "functionName" -> "`dateaddinterval`", |
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.
dateaddinterval there is no such function. That might confuse users. We could pass + instead, or create a error condition especially for the DateAddInterval expression (not sub-class of INVALID_PARAMETER_VALUE ).
|
@MaxGekk this PR is ready for merge, let me know when you re-review it so I can rerun the CIs, so we do not break something, as these runs are from yesterday. |
|
|
||
| def ansiIllegalArgumentError(message: String): SparkIllegalArgumentException = { | ||
| def invalidIntervalWithMicrosecondsAdditionError( | ||
| funcName: String): SparkIllegalArgumentException = { |
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.
funcName is not used anymore. Could you remove it, please.
MaxGekk
left a comment
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.
Waiting for CI.
|
+1, LGTM. Merging to master. |
What changes were proposed in this pull request?
Introducing two new error classes instead of _LEGACY_ERROR_TEMP_2000.
Classes introduced:
Why are the changes needed?
We want to assign names for all existing error classes.
Does this PR introduce any user-facing change?
Yes, error message changed.
How was this patch tested?
Existing tests cover error raising.
Was this patch authored or co-authored using generative AI tooling?
No.