Skip to content

[SPARK-31557][SQL] Fix timestamps rebasing in legacy parsers#28408

Closed
MaxGekk wants to merge 3 commits intoapache:masterfrom
MaxGekk:fix-rebasing-in-legacy-timestamp-formatter
Closed

[SPARK-31557][SQL] Fix timestamps rebasing in legacy parsers#28408
MaxGekk wants to merge 3 commits intoapache:masterfrom
MaxGekk:fix-rebasing-in-legacy-timestamp-formatter

Conversation

@MaxGekk
Copy link
Member

@MaxGekk MaxGekk commented Apr 29, 2020

What changes were proposed in this pull request?

In the PR, I propose to fix two legacy timestamp formatter LegacySimpleTimestampFormatter and LegacyFastTimestampFormatter to perform micros rebasing in parsing/formatting from/to strings.

Why are the changes needed?

Legacy timestamps formatters operate on the hybrid calendar (Julian + Gregorian), so, the input micros should be rebased to have the same date-time fields as in Proleptic Gregorian calendar used by Spark SQL, see SPARK-26651.

Does this PR introduce any user-facing change?

Yes

How was this patch tested?

Added tests to TimestampFormatterSuite

@MaxGekk
Copy link
Member Author

MaxGekk commented Apr 29, 2020

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

@SparkQA
Copy link

SparkQA commented Apr 29, 2020

Test build #122080 has finished for PR 28408 at commit e966895.

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

@MaxGekk
Copy link
Member Author

MaxGekk commented Apr 30, 2020

jenkins, retest this, please

@SparkQA
Copy link

SparkQA commented Apr 30, 2020

Test build #122108 has finished for PR 28408 at commit e966895.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@cloud-fan
Copy link
Contributor

retest this please

@SparkQA
Copy link

SparkQA commented Apr 30, 2020

Test build #122117 has finished for PR 28408 at commit e966895.

  • 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 c09cfb9 Apr 30, 2020
cloud-fan pushed a commit that referenced this pull request Apr 30, 2020
In the PR, I propose to fix two legacy timestamp formatter `LegacySimpleTimestampFormatter` and `LegacyFastTimestampFormatter` to perform micros rebasing in parsing/formatting from/to strings.

Legacy timestamps formatters operate on the hybrid calendar (Julian + Gregorian), so, the input micros should be rebased to have the same date-time fields as in Proleptic Gregorian calendar used by Spark SQL, see SPARK-26651.

Yes

Added tests to `TimestampFormatterSuite`

Closes #28408 from MaxGekk/fix-rebasing-in-legacy-timestamp-formatter.

Authored-by: Max Gekk <max.gekk@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit c09cfb9)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
@MaxGekk MaxGekk deleted the fix-rebasing-in-legacy-timestamp-formatter branch June 5, 2020 19:48
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

Comments