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 2022/03/24 08:33:17 UTC
[GitHub] [spark] MaxGekk opened a new pull request #35957: [SPARK-37568][SQL][3.3] Support 2-arguments by the convert_timezone() function
MaxGekk opened a new pull request #35957:
URL: https://github.com/apache/spark/pull/35957
### What changes were proposed in this pull request?
Add new constructor to the `ConvertTimezone` expression (see https://github.com/apache/spark/pull/34817) which accepts only 2 arguments:
1. `<targetTz>` - the time zone to which the input timestamp should be converted.
2. `<sourceTs>` - the timestamp to convert.
and sets `<sourceTz>` to the current session time zone (see the SQL config `spark.sql.session.timeZone`).
### Why are the changes needed?
To help users in migrations from other systems to Spark SQL. Other systems support optional first parameter:
- https://docs.aws.amazon.com/redshift/latest/dg/CONVERT_TIMEZONE.html
- https://docs.snowflake.com/en/sql-reference/functions/convert_timezone.html
### Does this PR introduce _any_ user-facing change?
No, it extends the existing signature, and the function hasn't been released yet.
### How was this patch tested?
By running new tests:
```
$ build/sbt "sql/test:testOnly org.apache.spark.sql.expressions.ExpressionInfoSuite"
$ build/sbt "sql/testOnly org.apache.spark.sql.SQLQueryTestSuite -- -z timestamp-ltz.sql"
$ build/sbt "sql/testOnly org.apache.spark.sql.SQLQueryTestSuite -- -z timestamp-ntz.sql"
```
--
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] MaxGekk commented on pull request #35957: [SPARK-37568][SQL][3.3] Support 2-arguments by the convert_timezone() function
Posted by GitBox <gi...@apache.org>.
MaxGekk commented on pull request #35957:
URL: https://github.com/apache/spark/pull/35957#issuecomment-1077496613
@HyukjinKwon @gengliangwang @HyukjinKwon Could you approve the backport to 3.3, please. Just in case, there were no conflicts.
--
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] MaxGekk commented on pull request #35957: [SPARK-37568][SQL][3.3] Support 2-arguments by the convert_timezone() function
Posted by GitBox <gi...@apache.org>.
MaxGekk commented on pull request #35957:
URL: https://github.com/apache/spark/pull/35957#issuecomment-1077701934
Merged to 3.3. Thank you, @gengliangwang and @cloud-fan for review.
--
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] MaxGekk closed pull request #35957: [SPARK-37568][SQL][3.3] Support 2-arguments by the convert_timezone() function
Posted by GitBox <gi...@apache.org>.
MaxGekk closed pull request #35957:
URL: https://github.com/apache/spark/pull/35957
--
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