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 2021/02/14 08:23:55 UTC
[GitHub] [spark] MaxGekk opened a new pull request #31562: [SPARK-34434][SQL][DOCS] Mention DS rebase options in `SparkUpgradeException`
MaxGekk opened a new pull request #31562:
URL: https://github.com/apache/spark/pull/31562
### What changes were proposed in this pull request?
Mention the DS options introduced by https://github.com/apache/spark/pull/31529 and by https://github.com/apache/spark/pull/31489 in `SparkUpgradeException`.
### Why are the changes needed?
To improve user experience with Spark SQL. Before the changes, the error message recommends to set SQL configs but the configs cannot help in the some situations (see the PRs for more details).
### Does this PR introduce _any_ user-facing change?
Yes. After the changes, the error message is:
_org.apache.spark.SparkUpgradeException: You may get a different result due to the upgrading of Spark 3.0: reading dates before 1582-10-15 or timestamps before 1900-01-01T00:00:00Z from Parquet files can be ambiguous, as the files may be written by Spark 2.x or legacy versions of Hive, which uses a legacy hybrid calendar that is different from Spark 3.0+'s Proleptic Gregorian calendar. See more details in SPARK-31404. You can set the SQL config 'spark.sql.legacy.parquet.datetimeRebaseModeInRead' or the datasource option 'datetimeRebaseMode' to 'LEGACY' to rebase the datetime values w.r.t. the calendar difference during reading. To read the datetime values as it is, set the SQL config 'spark.sql.legacy.parquet.datetimeRebaseModeInRead' or the datasource option 'datetimeRebaseMode' to 'CORRECTED'._
### How was this patch tested?
1. By checking coding style: `./dev/scalastyle`
2. By running the related test suite:
```
$ build/sbt -Phive-2.3 -Phive-thriftserver "test:testOnly *ParquetRebaseDatetimeV1Suite"
```
----------------------------------------------------------------
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] dongjoon-hyun commented on a change in pull request #31562: [SPARK-34434][SQL] Mention DS rebase options in `SparkUpgradeException`
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #31562:
URL: https://github.com/apache/spark/pull/31562#discussion_r575902810
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceUtils.scala
##########
@@ -132,19 +133,23 @@ object DataSourceUtils {
}
def newRebaseExceptionInRead(format: String): SparkUpgradeException = {
- val config = format match {
- case "Parquet INT96" => SQLConf.LEGACY_PARQUET_INT96_REBASE_MODE_IN_READ.key
- case "Parquet" => SQLConf.LEGACY_PARQUET_REBASE_MODE_IN_READ.key
- case "Avro" => SQLConf.LEGACY_AVRO_REBASE_MODE_IN_READ.key
+ val (config, option) = format match {
+ case "Parquet INT96" =>
+ (SQLConf.LEGACY_PARQUET_INT96_REBASE_MODE_IN_READ.key, ParquetOptions.INT96_REBASE_MODE)
+ case "Parquet" =>
+ (SQLConf.LEGACY_PARQUET_REBASE_MODE_IN_READ.key, ParquetOptions.DATETIME_REBASE_MODE)
+ case "Avro" =>
+ (SQLConf.LEGACY_AVRO_REBASE_MODE_IN_READ.key, "datetimeRebaseMode")
Review comment:
I agree that this is inevitable because `AvroOptions` lives in external module.
----------------------------------------------------------------
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 #31562: [SPARK-34434][SQL] Mention DS rebase options in `SparkUpgradeException`
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #31562:
URL: https://github.com/apache/spark/pull/31562#issuecomment-778759595
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/39727/
----------------------------------------------------------------
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 #31562: [SPARK-34434][SQL] Mention DS rebase options in `SparkUpgradeException`
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #31562:
URL: https://github.com/apache/spark/pull/31562#issuecomment-778780024
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/135146/
----------------------------------------------------------------
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 #31562: [SPARK-34434][SQL] Mention DS rebase options in `SparkUpgradeException`
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #31562:
URL: https://github.com/apache/spark/pull/31562#issuecomment-778780024
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/135146/
----------------------------------------------------------------
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 #31562: [SPARK-34434][SQL] Mention DS rebase options in `SparkUpgradeException`
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #31562:
URL: https://github.com/apache/spark/pull/31562#issuecomment-778774466
**[Test build #135146 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/135146/testReport)** for PR 31562 at commit [`7531929`](https://github.com/apache/spark/commit/75319295008ed07c02a4d05fe9ff988913bf4768).
* 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 removed a comment on pull request #31562: [SPARK-34434][SQL] Mention DS rebase options in `SparkUpgradeException`
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #31562:
URL: https://github.com/apache/spark/pull/31562#issuecomment-778747223
**[Test build #135146 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/135146/testReport)** for PR 31562 at commit [`7531929`](https://github.com/apache/spark/commit/75319295008ed07c02a4d05fe9ff988913bf4768).
----------------------------------------------------------------
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] dongjoon-hyun closed pull request #31562: [SPARK-34434][SQL] Mention DS rebase options in `SparkUpgradeException`
Posted by GitBox <gi...@apache.org>.
dongjoon-hyun closed pull request #31562:
URL: https://github.com/apache/spark/pull/31562
----------------------------------------------------------------
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 #31562: [SPARK-34434][SQL] Mention DS rebase options in `SparkUpgradeException`
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #31562:
URL: https://github.com/apache/spark/pull/31562#issuecomment-778759595
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/39727/
----------------------------------------------------------------
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 #31562: [SPARK-34434][SQL] Mention DS rebase options in `SparkUpgradeException`
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #31562:
URL: https://github.com/apache/spark/pull/31562#issuecomment-778747223
**[Test build #135146 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/135146/testReport)** for PR 31562 at commit [`7531929`](https://github.com/apache/spark/commit/75319295008ed07c02a4d05fe9ff988913bf4768).
----------------------------------------------------------------
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