Skip to content

Conversation

@MaxGekk
Copy link
Member

@MaxGekk MaxGekk commented Mar 20, 2019

What changes were proposed in this pull request?

In the PR, I propose to extend Literal.apply to support constructing literals of TimestampType and DateType from java.time.Instant and java.time.LocalDate. The java classes have been already supported as external types for TimestampType and DateType by the PRs #23811 and #23913.

How was this patch tested?

Added new tests to LiteralExpressionSuite.

@HyukjinKwon
Copy link
Member

ok to test

@HyukjinKwon
Copy link
Member

add to whitelist

@SparkQA
Copy link

SparkQA commented Mar 21, 2019

Test build #103739 has finished for PR 24161 at commit 80b2e30.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Mar 21, 2019

Test build #103745 has finished for PR 24161 at commit 80b2e30.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Mar 21, 2019

Test build #103753 has finished for PR 24161 at commit c51cd91.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@MaxGekk
Copy link
Member Author

MaxGekk commented Mar 21, 2019

@cloud-fan Could you take a look at this PR, please.

Copy link
Member

@srowen srowen left a 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

@cloud-fan
Copy link
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in 0f4f816 Mar 21, 2019
}

test("construct literals from arrays of java.time.LocalDate") {
withSQLConf(SQLConf.DATETIME_JAVA8API_EANBLED.key -> "true") {
Copy link
Contributor

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?

@MaxGekk MaxGekk deleted the literal-instant-localdate branch September 18, 2019 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants