-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-31835][SQL][TESTS] Add zoneId to codegen related tests in DateExpressionsSuite #28653
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
Conversation
|
cc @cloud-fan @MaxGekk thanks very much. |
| } | ||
| // Test escaping of format | ||
| GenerateUnsafeProjection.generate(FromUnixTime(Literal(0L), Literal("\"quote")) :: Nil) | ||
| GenerateUnsafeProjection.generate(FromUnixTime(Literal(0L), Literal("\"quote"), JST_OPT) :: Nil) |
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.
if the timezone doesn't matter, shall we use UTC?
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.
Particular time zone doesn't matter here, we just check that codegen doesn't throw any exception.
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.
LGTM
| } | ||
| // Test escaping of format | ||
| GenerateUnsafeProjection.generate(FromUnixTime(Literal(0L), Literal("\"quote")) :: Nil) | ||
| GenerateUnsafeProjection.generate(FromUnixTime(Literal(0L), Literal("\"quote"), JST_OPT) :: Nil) |
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.
Particular time zone doesn't matter here, we just check that codegen doesn't throw any exception.
|
Test build #123178 has finished for PR 28653 at commit
|
|
Test build #123186 has finished for PR 28653 at commit
|
|
thanks, merging to master/3.0! |
…ExpressionsSuite ### What changes were proposed in this pull request? This PR modifies some codegen related tests to test escape characters for datetime functions which are time zone aware. If the timezone is absent, the formatter could result in `null` caused by `java.util.NoSuchElementException: None.get` and bypassing the real intention of those test cases. ### Why are the changes needed? fix tests ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? passing the modified test cases. Closes #28653 from yaooqinn/SPARK-31835. Authored-by: Kent Yao <[email protected]> Signed-off-by: Wenchen Fan <[email protected]> (cherry picked from commit 311fe6a) Signed-off-by: Wenchen Fan <[email protected]>
What changes were proposed in this pull request?
This PR modifies some codegen related tests to test escape characters for datetime functions which are time zone aware. If the timezone is absent, the formatter could result in
nullcaused byjava.util.NoSuchElementException: None.getand bypassing the real intention of those test cases.Why are the changes needed?
fix tests
Does this PR introduce any user-facing change?
no
How was this patch tested?
passing the modified test cases.