Skip to content

Conversation

@MaxGekk
Copy link
Member

@MaxGekk MaxGekk commented Jul 11, 2019

What changes were proposed in this pull request?

Reverted initialization of date-time constants in DateTimeUtils introduced by #23878. As a comment in Delta repo states, the compiler can do additional optimizations if values can be calculated at compile time: https://github.com/delta-io/delta/blob/master/src/main/scala/org/apache/spark/sql/delta/util/DateTimeUtils.scala#L63-L75

How was this patch tested?

This was tested by existing test suites.

@MaxGekk
Copy link
Member Author

MaxGekk commented Jul 11, 2019

@srowen @hvanhovell Please, review the PR.

Copy link
Contributor

@hvanhovell hvanhovell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - pending jenkins

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM, too.
This is the same logic from delta/DateTimeUtils.scala.

@SparkQA
Copy link

SparkQA commented Jul 11, 2019

Test build #107537 has finished for PR 25116 at commit b3bd3a3.

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

@hvanhovell
Copy link
Contributor

Merging to master.

vinodkc pushed a commit to vinodkc/spark that referenced this pull request Jul 18, 2019
…le expressions

## What changes were proposed in this pull request?

Reverted initialization of date-time constants in `DateTimeUtils` introduced by apache#23878. As a comment in [Delta repo](https://github.com/delta-io/delta) states, the compiler can do additional optimizations if values can be calculated at compile time: https://github.com/delta-io/delta/blob/master/src/main/scala/org/apache/spark/sql/delta/util/DateTimeUtils.scala#L63-L75

## How was this patch tested?

This was tested by existing test suites.

Closes apache#25116 from MaxGekk/datetime-consts-init.

Authored-by: Maxim Gekk <[email protected]>
Signed-off-by: herman <[email protected]>
@MaxGekk MaxGekk deleted the datetime-consts-init branch September 18, 2019 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants