You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/05/05 09:13:02 UTC

[GitHub] [spark] MaxGekk opened a new pull request #28453: [SPARK-31641][SQL] Fix days conversions by JSON legacy parser

MaxGekk opened a new pull request #28453:
URL: https://github.com/apache/spark/pull/28453


   ### What changes were proposed in this pull request?
   Perform days rebasing while converting days from JSON string field. In Spark 2.4 and earlier versions, the days are interpreted as days since the epoch in the hybrid calendar (Julian + Gregorian since 1582-10-15). Since Spark 3.0, the base calendar was switched to Proleptic Gregorian calendar, so, the days should be rebased to represent the same local date.  
   
   ### Why are the changes needed?
   The changes fix a bug and restore compatibility with Spark 2.4 in which:
   ```scala
   scala> spark.read.schema("d date").json(Seq("{'d': '-141704'}").toDS).show
   +----------+
   |         d|
   +----------+
   |1582-01-01|
   +----------+
   ```
   
   
   ### Does this PR introduce _any_ user-facing change?
   Yes.
   
   Before:
   ```scala
   scala> spark.read.schema("d date").json(Seq("{'d': '-141704'}").toDS).show
   +----------+
   |         d|
   +----------+
   |1582-01-11|
   +----------+
   ```
   
   After:
   ```scala
   scala> spark.read.schema("d date").json(Seq("{'d': '-141704'}").toDS).show
   +----------+
   |         d|
   +----------+
   |1582-01-01|
   +----------+
   ```
   
   ### How was this patch tested?
   Add a test to `JsonSuite`.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #28453: [SPARK-31641][SQL] Fix days conversions by JSON legacy parser

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28453:
URL: https://github.com/apache/spark/pull/28453#issuecomment-624064161


   **[Test build #122312 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/122312/testReport)** for PR 28453 at commit [`03d9d33`](https://github.com/apache/spark/commit/03d9d3341339ccdb59fdef0247f8e15d063b4715).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon commented on pull request #28453: [SPARK-31641][SQL] Fix days conversions by JSON legacy parser

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #28453:
URL: https://github.com/apache/spark/pull/28453#issuecomment-635191505


   Nice, thanks @MaxGekk 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #28453: [SPARK-31641][SQL] Fix days conversions by JSON legacy parser

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28453:
URL: https://github.com/apache/spark/pull/28453#issuecomment-624065431






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #28453: [SPARK-31641][SQL] Fix days conversions by JSON legacy parser

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #28453:
URL: https://github.com/apache/spark/pull/28453#issuecomment-623947231


   **[Test build #122312 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/122312/testReport)** for PR 28453 at commit [`03d9d33`](https://github.com/apache/spark/commit/03d9d3341339ccdb59fdef0247f8e15d063b4715).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #28453: [SPARK-31641][SQL] Fix days conversions by JSON legacy parser

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #28453:
URL: https://github.com/apache/spark/pull/28453#issuecomment-623947816






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] MaxGekk commented on pull request #28453: [SPARK-31641][SQL] Fix days conversions by JSON legacy parser

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on pull request #28453:
URL: https://github.com/apache/spark/pull/28453#issuecomment-623946781


   @HyukjinKwon @cloud-fan Could you review this PR, please.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28453: [SPARK-31641][SQL] Fix days conversions by JSON legacy parser

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28453:
URL: https://github.com/apache/spark/pull/28453#issuecomment-623947816






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan commented on pull request #28453: [SPARK-31641][SQL] Fix days conversions by JSON legacy parser

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #28453:
URL: https://github.com/apache/spark/pull/28453#issuecomment-624081954


   thanks, merging to master/3.0!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #28453: [SPARK-31641][SQL] Fix days conversions by JSON legacy parser

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #28453:
URL: https://github.com/apache/spark/pull/28453#issuecomment-623947231


   **[Test build #122312 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/122312/testReport)** for PR 28453 at commit [`03d9d33`](https://github.com/apache/spark/commit/03d9d3341339ccdb59fdef0247f8e15d063b4715).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #28453: [SPARK-31641][SQL] Fix days conversions by JSON legacy parser

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #28453:
URL: https://github.com/apache/spark/pull/28453#issuecomment-624065431






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org