[SPARK-49583][SQL] Define the error sub-condition SECONDS_FRACTION for invalid seconds fraction pattern#48058
Closed
MaxGekk wants to merge 1 commit into
Closed
[SPARK-49583][SQL] Define the error sub-condition SECONDS_FRACTION for invalid seconds fraction pattern#48058MaxGekk wants to merge 1 commit into
SECONDS_FRACTION for invalid seconds fraction pattern#48058MaxGekk wants to merge 1 commit into
Conversation
SECONDS_FRACTION for invalid seconds fraction patternSECONDS_FRACTION for invalid seconds fraction pattern
cloud-fan
approved these changes
Sep 10, 2024
Member
Author
|
Merging to master. Thank you, @cloud-fan for review. |
MaxGekk
added a commit
that referenced
this pull request
Sep 10, 2024
…Class` in `SparkThrowableSuite` and in `DateTimeFormatterHelperSuite` ### What changes were proposed in this pull request? In the PR, I propose to use `condition` instead of `errorClass` in two test suites: - SparkThrowableSuite - DateTimeFormatterHelperSuite ### Why are the changes needed? Because the changes from the PR #48027 conflict to #48058 and #48026, and tests in #48027 were passed earlier than the last PRs were merged to master. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? By compiling and running the following tests locally: ``` $ build/sbt "test:testOnly *org.apache.spark.sql.catalyst.util.DateTimeFormatterHelperSuite" $ build/sbt "test:testOnly *SparkThrowableSuite" ``` ### Was this patch authored or co-authored using generative AI tooling? No. Closes #48061 from MaxGekk/fix-missing-errorClass. Authored-by: Max Gekk <max.gekk@gmail.com> Signed-off-by: Max Gekk <max.gekk@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
In the PR, I propose new sub-condition
SECONDS_FRACTIONof the error conditionINVALID_DATETIME_PATTERNin case when datetime pattern doesn't contain proper seconds fraction of variable length.Why are the changes needed?
To fix the failure on internal assert. This change should improve user experience with Spark SQL.
Before the changes, Spark fails while parsing the datetime patterns like
\nSSSS\r:Does this PR introduce any user-facing change?
Should not. Only if user's code depends on the format of error message.
After changes, users get the error:
How was this patch tested?
By running new test suites:
Was this patch authored or co-authored using generative AI tooling?
No.