Skip to content
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

[SPARK-31940][SQL][DOCS] Document the default JVM time zone in to/fromJavaDate and legacy date formatters #28767

Closed
wants to merge 3 commits into from

Conversation

MaxGekk
Copy link
Member

@MaxGekk MaxGekk commented Jun 9, 2020

What changes were proposed in this pull request?

Update comments for DateTimeUtils.toJavaDate and fromJavaDate, and for the legacy date formatters LegacySimpleDateFormatter and LegacyFastDateFormatter regarding to the default JVM time zone. The comments say that the default JVM time zone is used intentionally for backward compatibility with Spark 2.4 and earlier versions.

Closes #28709

Why are the changes needed?

To document current behaviour of related methods in DateTimeUtils and the legacy date formatters. For example, correctness of HiveResult.hiveResultString and toHiveString is directly related to the same time zone used by toJavaDate and LegacyFastDateFormatter.

Does this PR introduce any user-facing change?

No

How was this patch tested?

By running the Scala style checker ./dev/scalastyle

@MaxGekk
Copy link
Member Author

MaxGekk commented Jun 9, 2020

@cloud-fan @HyukjinKwon Please, review this PR.

@juliuszsompolski After offline discussions, we decided to just document the current behaviour and keep the legacy formatters dependent on the default JVM time zone (and ignore Spark's session time zone).

@SparkQA
Copy link

SparkQA commented Jun 9, 2020

Test build #123684 has finished for PR 28767 at commit 829f909.

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

@cloud-fan
Copy link
Contributor

thanks, merging to master/3.0!

@cloud-fan cloud-fan closed this in de91915 Jun 9, 2020
cloud-fan pushed a commit that referenced this pull request Jun 9, 2020
…mJavaDate and legacy date formatters

### What changes were proposed in this pull request?
Update comments for `DateTimeUtils`.`toJavaDate` and `fromJavaDate`, and for the legacy date formatters `LegacySimpleDateFormatter` and `LegacyFastDateFormatter` regarding to the default JVM time zone. The comments say that the default JVM time zone is used intentionally for backward compatibility with Spark 2.4 and earlier versions.

Closes #28709

### Why are the changes needed?
To document current behaviour of related methods in `DateTimeUtils` and the legacy date formatters. For example, correctness of `HiveResult.hiveResultString` and `toHiveString` is directly related to the same time zone used by `toJavaDate` and `LegacyFastDateFormatter`.

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
By running the Scala style checker `./dev/scalastyle`

Closes #28767 from MaxGekk/doc-legacy-formatters.

Authored-by: Max Gekk <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
(cherry picked from commit de91915)
Signed-off-by: Wenchen Fan <[email protected]>
@MaxGekk MaxGekk deleted the doc-legacy-formatters branch December 11, 2020 20:26
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.

3 participants