-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-27222][SQL] Support Instant and LocalDate in Literal.apply #24161
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
|
ok to test |
|
add to whitelist |
|
Test build #103739 has finished for PR 24161 at commit
|
|
Test build #103745 has finished for PR 24161 at commit
|
|
Test build #103753 has finished for PR 24161 at commit
|
|
@cloud-fan Could you take a look at this PR, please. |
srowen
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.
Seems reasonable to me, but I don't know this part well
|
thanks, merging to master! |
| } | ||
|
|
||
| test("construct literals from arrays of java.time.LocalDate") { | ||
| withSQLConf(SQLConf.DATETIME_JAVA8API_EANBLED.key -> "true") { |
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.
not a big idea, but the behavior of literal is not controlled by this config right?
What changes were proposed in this pull request?
In the PR, I propose to extend
Literal.applyto support constructing literals ofTimestampTypeandDateTypefromjava.time.Instantandjava.time.LocalDate. The java classes have been already supported as external types forTimestampTypeandDateTypeby the PRs #23811 and #23913.How was this patch tested?
Added new tests to
LiteralExpressionSuite.