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/10 11:50:44 UTC

[GitHub] [spark] MaxGekk opened a new pull request #28489: [SPARK-31672][SQL] Fix loading of timestamps before 1582-10-15 from dictionary encoded Parquet columns

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


   ### What changes were proposed in this pull request?
   Modified the `decodeDictionaryIds()` method of `VectorizedColumnReader` to handle especially `TimestampType` when the passed parameter `rebaseDateTime` is true. In that case, decoded milliseconds/microseconds are rebased from the hybrid calendar to Proleptic Gregorian calendar using `RebaseDateTime`.`rebaseJulianToGregorianMicros()`.
   
   ### Why are the changes needed?
   This fixes the bug of loading timestamps before the cutover day from dictionary encoded column in parquet files. The code below forces dictionary encoding:
   ```scala
   spark.conf.set("spark.sql.legacy.parquet.rebaseDateTimeInWrite.enabled", true)
   scala> spark.conf.set("spark.sql.parquet.outputTimestampType", "TIMESTAMP_MICROS")
   scala>
   Seq.tabulate(8)(_ => "1001-01-01 01:02:03.123").toDF("tsS")
     .select($"tsS".cast("timestamp").as("ts")).repartition(1)
     .write
     .option("parquet.enable.dictionary", true)
     .parquet(path)
   ```
   Load the dates back:
   ```scala
   scala> spark.read.parquet(path).show(false)
   +-----------------------+
   |ts                     |
   +-----------------------+
   |1001-01-07 00:32:20.123|
   ...
   |1001-01-07 00:32:20.123|
   +-----------------------+
   ```
   Expected values **must be 1001-01-01 01:02:03.123** but not 1001-01-07 00:32:20.123.
   
   ### Does this PR introduce _any_ user-facing change?
   Yes. After the changes:
   ```scala
   scala> spark.read.parquet(path).show(false)
   +-----------------------+
   |ts                     |
   +-----------------------+
   |1001-01-01 01:02:03.123|
   ...
   |1001-01-01 01:02:03.123|
   +-----------------------+
   ```
   
   ### How was this patch tested?
   Modified the test `SPARK-31159: rebasing timestamps in write` in `ParquetIOSuite` to checked reading dictionary encoded dates.


----------------------------------------------------------------
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 #28489: [SPARK-31672][SQL] Fix loading of timestamps before 1582-10-15 from dictionary encoded Parquet columns

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






----------------------------------------------------------------
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 #28489: [SPARK-31672][SQL] Fix loading of timestamps before 1582-10-15 from dictionary encoded Parquet columns

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






----------------------------------------------------------------
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 #28489: [SPARK-31672][SQL] Fix loading of timestamps before 1582-10-15 from dictionary encoded Parquet columns

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






----------------------------------------------------------------
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 #28489: [SPARK-31672][SQL] Fix loading of timestamps before 1582-10-15 from dictionary encoded Parquet columns

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


   **[Test build #122474 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/122474/testReport)** for PR 28489 at commit [`8eecc90`](https://github.com/apache/spark/commit/8eecc90ad4494edcad208c32035222aa403209b7).


----------------------------------------------------------------
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 #28489: [SPARK-31672][SQL] Fix loading of timestamps before 1582-10-15 from dictionary encoded Parquet columns

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


   LGTM, 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] AmplabJenkins removed a comment on pull request #28489: [SPARK-31672][SQL] Fix loading of timestamps before 1582-10-15 from dictionary encoded Parquet columns

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






----------------------------------------------------------------
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 #28489: [SPARK-31672][SQL] Fix loading of timestamps before 1582-10-15 from dictionary encoded Parquet columns

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


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/122474/
   Test FAILed.


----------------------------------------------------------------
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 #28489: [SPARK-31672][SQL] Fix loading of timestamps before 1582-10-15 from dictionary encoded Parquet columns

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


   **[Test build #122476 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/122476/testReport)** for PR 28489 at commit [`06dc785`](https://github.com/apache/spark/commit/06dc7851575e8e7a316384766b6197a444e24172).


----------------------------------------------------------------
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 #28489: [SPARK-31672][SQL] Fix loading of timestamps before 1582-10-15 from dictionary encoded Parquet columns

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


   **[Test build #122476 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/122476/testReport)** for PR 28489 at commit [`06dc785`](https://github.com/apache/spark/commit/06dc7851575e8e7a316384766b6197a444e24172).
    * 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] SparkQA commented on pull request #28489: [SPARK-31672][SQL] Fix loading of timestamps before 1582-10-15 from dictionary encoded Parquet columns

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


   **[Test build #122476 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/122476/testReport)** for PR 28489 at commit [`06dc785`](https://github.com/apache/spark/commit/06dc7851575e8e7a316384766b6197a444e24172).


----------------------------------------------------------------
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 #28489: [SPARK-31672][SQL] Fix loading of timestamps before 1582-10-15 from dictionary encoded Parquet columns

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


   **[Test build #122474 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/122474/testReport)** for PR 28489 at commit [`8eecc90`](https://github.com/apache/spark/commit/8eecc90ad4494edcad208c32035222aa403209b7).


----------------------------------------------------------------
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 #28489: [SPARK-31672][SQL] Fix loading of timestamps before 1582-10-15 from dictionary encoded Parquet columns

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


   Merged build finished. Test FAILed.


----------------------------------------------------------------
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 #28489: [SPARK-31672][SQL] Fix loading of timestamps before 1582-10-15 from dictionary encoded Parquet columns

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






----------------------------------------------------------------
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 #28489: [SPARK-31672][SQL] Fix loading of timestamps before 1582-10-15 from dictionary encoded Parquet columns

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


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


----------------------------------------------------------------
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 #28489: [SPARK-31672][SQL] Fix loading of timestamps before 1582-10-15 from dictionary encoded Parquet columns

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






----------------------------------------------------------------
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 #28489: [SPARK-31672][SQL] Fix loading of timestamps before 1582-10-15 from dictionary encoded Parquet columns

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






----------------------------------------------------------------
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 #28489: [SPARK-31672][SQL] Fix loading of timestamps before 1582-10-15 from dictionary encoded Parquet columns

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


   **[Test build #122474 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/122474/testReport)** for PR 28489 at commit [`8eecc90`](https://github.com/apache/spark/commit/8eecc90ad4494edcad208c32035222aa403209b7).
    * This patch **fails Spark unit 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