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/12/01 06:39:32 UTC
[GitHub] [spark] beliefer opened a new pull request #34766: [SPARK-37513][SQL][DOC] Additive expression of date and interval returns different data type between Spark3.2 and Spark3.1
beliefer opened a new pull request #34766:
URL: https://github.com/apache/spark/pull/34766
### What changes were proposed in this pull request?
The SQL show below previously returned the date type, now it returns the timestamp type.
`select date '2011-11-11' + interval 12 hours;`
The basic reason is:
In Spark3.1
https://github.com/apache/spark/blob/75cac1fe0a46dbdf2ad5b741a3a49c9ab618cdce/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala#L338
In Spark3.2
https://github.com/apache/spark/blob/ceae41ba5cafb479cdcfc9a6a162945646a68f05/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala#L376
Because Spark3.2 have been released, so we add the migration guide for it.
### Why are the changes needed?
Give a migration guide for different behavior between Spark3.1 and Spark3.2.
### Does this PR introduce _any_ user-facing change?
'No'.
Just modify the docs.
### How was this patch tested?
No need.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34766: [SPARK-37513][SQL][DOC] Additive expression of date and interval returns different data type between Spark3.2 and Spark3.1
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34766:
URL: https://github.com/apache/spark/pull/34766#issuecomment-983362686
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145799/
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34766: [SPARK-37513][SQL][DOC] Additive expression of date and interval returns different data type between Spark3.2 and Spark3.1
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34766:
URL: https://github.com/apache/spark/pull/34766#issuecomment-983362686
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145799/
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34766: [SPARK-37513][SQL][DOC] Additive expression of date and interval returns different data type between Spark3.2 and Spark3.1
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34766:
URL: https://github.com/apache/spark/pull/34766#issuecomment-983336928
**[Test build #145799 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145799/testReport)** for PR 34766 at commit [`29b8dc3`](https://github.com/apache/spark/commit/29b8dc3844f470f3a6b78319e02acb70a907b4a6).
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34766: [SPARK-37513][SQL][DOC] Additive expression of date and interval returns different data type between Spark3.2 and Spark3.1
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34766:
URL: https://github.com/apache/spark/pull/34766#issuecomment-983344028
**[Test build #145799 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145799/testReport)** for PR 34766 at commit [`29b8dc3`](https://github.com/apache/spark/commit/29b8dc3844f470f3a6b78319e02acb70a907b4a6).
* 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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 a change in pull request #34766: [SPARK-37513][SQL][DOC] Additive expression of date and interval returns different data type between Spark3.2 and Spark3.1
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #34766:
URL: https://github.com/apache/spark/pull/34766#discussion_r759902213
##########
File path: docs/sql-migration-guide.md
##########
@@ -133,6 +133,8 @@ license: |
- In Spark 3.2, create/alter view will fail if the input query output columns contain auto-generated alias. This is necessary to make sure the query output column names are stable across different spark versions. To restore the behavior before Spark 3.2, set `spark.sql.legacy.allowAutoGeneratedAliasForView` to `true`.
+ - In Spark 3.2, additive expression of date and interval like `date '2011-11-11' + interval 12 hours` will return timestamp. In Spark 3.1 and earlier, the same expression will return date. To restore the behavior before Spark 3.2, you can use `cast` to convert timestamp as date.
Review comment:
```suggestion
- In Spark 3.2, date +/- interval with only day-time fields such as `date '2011-11-11' + interval 12 hours` returns timestamp. In Spark 3.1 and earlier, the same expression returns date. To restore the behavior before Spark 3.2, you can use `cast` to convert timestamp as date.
```
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 closed pull request #34766: [SPARK-37513][SQL][DOC] date +/- interval with only day-time fields returns different data type between Spark3.2 and Spark3.1
Posted by GitBox <gi...@apache.org>.
cloud-fan closed pull request #34766:
URL: https://github.com/apache/spark/pull/34766
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34766: [SPARK-37513][SQL][DOC] Additive expression of date and interval returns different data type between Spark3.2 and Spark3.1
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34766:
URL: https://github.com/apache/spark/pull/34766#issuecomment-983336928
**[Test build #145799 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145799/testReport)** for PR 34766 at commit [`29b8dc3`](https://github.com/apache/spark/commit/29b8dc3844f470f3a6b78319e02acb70a907b4a6).
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34766: [SPARK-37513][SQL][DOC] date +/- interval with only day-time fields returns different data type between Spark3.2 and Spark3.1
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34766:
URL: https://github.com/apache/spark/pull/34766#issuecomment-983437514
Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50273/
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34766: [SPARK-37513][SQL][DOC] date +/- interval with only day-time fields returns different data type between Spark3.2 and Spark3.1
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34766:
URL: https://github.com/apache/spark/pull/34766#issuecomment-983395418
Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50273/
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34766: [SPARK-37513][SQL][DOC] date +/- interval with only day-time fields returns different data type between Spark3.2 and Spark3.1
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #34766:
URL: https://github.com/apache/spark/pull/34766#issuecomment-983398707
thanks, merging to master/3.2!
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34766: [SPARK-37513][SQL][DOC] date +/- interval with only day-time fields returns different data type between Spark3.2 and Spark3.1
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34766:
URL: https://github.com/apache/spark/pull/34766#issuecomment-983449554
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/50273/
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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 #34766: [SPARK-37513][SQL][DOC] date +/- interval with only day-time fields returns different data type between Spark3.2 and Spark3.1
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34766:
URL: https://github.com/apache/spark/pull/34766#issuecomment-983449554
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/50273/
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
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