Skip to content

Conversation

@MaxGekk
Copy link
Member

@MaxGekk MaxGekk commented May 23, 2020

What changes were proposed in this pull request?

Use format() methods for Java date-time types in Row.jsonValue. The PR #28582 added the methods to avoid conversions to days and microseconds.

Why are the changes needed?

To avoid unnecessary overhead of converting Java date-time types to micros/days before formatting. Also formatters have to convert input micros/days back to Java types to pass instances to standard library API.

Does this PR introduce any user-facing change?

No

How was this patch tested?

By existing tests in RowJsonSuite.

@MaxGekk
Copy link
Member Author

MaxGekk commented May 23, 2020

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

@SparkQA
Copy link

SparkQA commented May 23, 2020

Test build #123025 has finished for PR 28620 at commit 1dac0ef.

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

@MaxGekk
Copy link
Member Author

MaxGekk commented May 23, 2020

jenkins, retest this, please

@SparkQA
Copy link

SparkQA commented May 23, 2020

Test build #123028 has finished for PR 28620 at commit 1dac0ef.

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

@HyukjinKwon
Copy link
Member

Merged to master and branch-3.0.

HyukjinKwon pushed a commit that referenced this pull request May 25, 2020
…ectly

### What changes were proposed in this pull request?
Use `format()` methods for Java date-time types in `Row.jsonValue`. The PR #28582 added the methods to avoid conversions to days and microseconds.

### Why are the changes needed?
To avoid unnecessary overhead of converting Java date-time types to micros/days before formatting. Also formatters have to convert input micros/days back to Java types to pass instances to standard library API.

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

### How was this patch tested?
By existing tests in `RowJsonSuite`.

Closes #28620 from MaxGekk/toJson-format-Java-datetime-types.

Authored-by: Max Gekk <max.gekk@gmail.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
(cherry picked from commit 7f36310)
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
@MaxGekk MaxGekk deleted the toJson-format-Java-datetime-types branch June 5, 2020 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants