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/03/01 18:36:34 UTC

[GitHub] [spark] MaxGekk opened a new pull request #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps

MaxGekk opened a new pull request #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753
 
 
   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   
   ### Does this PR introduce any user-facing change?
   <!--
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If no, write 'No'.
   -->
   
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-594059452
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/119228/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-593907841
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23967/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
cloud-fan closed pull request #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753
 
 
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-593907841
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23967/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-593154894
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/119143/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] SparkQA commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-594800667
 
 
   **[Test build #119309 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119309/testReport)** for PR 27753 at commit [`00a07ab`](https://github.com/apache/spark/commit/00a07ab500b63cb13edcd8bf71ad709d008e2d5b).
    * 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


With regards,
Apache Git Services

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


[GitHub] [spark] MaxGekk commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-593270620
 
 
   @cloud-fan @HyukjinKwon Please, review the PR. I haven't updated comments for `stringToTimestamp` yet. I will do that when I will address your comment later.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-593129753
 
 
   **[Test build #119143 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119143/testReport)** for PR 27753 at commit [`f107331`](https://github.com/apache/spark/commit/f10733147152e0b2ba7e5a298386e15b84eda421).

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-594802423
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/119309/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] MaxGekk commented on a change in pull request #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on a change in pull request #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#discussion_r387683497
 
 

 ##########
 File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala
 ##########
 @@ -213,38 +217,30 @@ class DateTimeUtilsSuite extends SparkFunSuite with Matchers with SQLHelper {
       expected = Option(date(2015, 3, 18, 12, 3, 17, 456000, zid = zoneId))
       checkStringToTimestamp("2015-03-18T12:03:17.456Z", expected)
       checkStringToTimestamp("2015-03-18 12:03:17.456Z", expected)
+      checkStringToTimestamp("2015-03-18 12:03:17.456UTC", expected)
 
       zoneId = getZoneId("GMT-01:00")
       expected = Option(date(2015, 3, 18, 12, 3, 17, 123000, zid = zoneId))
       checkStringToTimestamp("2015-03-18T12:03:17.123-1:0", expected)
       checkStringToTimestamp("2015-03-18T12:03:17.123-01:00", expected)
+      checkStringToTimestamp("2015-03-18T12:03:17.123GMT-01:00", expected)
 
       zoneId = getZoneId("GMT+07:30")
       expected = Option(date(2015, 3, 18, 12, 3, 17, 123000, zid = zoneId))
       checkStringToTimestamp("2015-03-18T12:03:17.123+07:30", expected)
+      checkStringToTimestamp("2015-03-18T12:03:17.123GMT+07:30", expected)
 
 Review comment:
   I have to leave the existing code only because of the case, see https://github.com/apache/spark/pull/27753#discussion_r386240731

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-594548379
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/24049/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-593129888
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23885/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-593910203
 
 
   **[Test build #119228 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119228/testReport)** for PR 27753 at commit [`bdfe5f3`](https://github.com/apache/spark/commit/bdfe5f3f77125d864a19371ecfbff53f06c3e568).

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] SparkQA commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-594547760
 
 
   **[Test build #119309 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119309/testReport)** for PR 27753 at commit [`00a07ab`](https://github.com/apache/spark/commit/00a07ab500b63cb13edcd8bf71ad709d008e2d5b).

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#discussion_r387575162
 
 

 ##########
 File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala
 ##########
 @@ -213,38 +217,30 @@ class DateTimeUtilsSuite extends SparkFunSuite with Matchers with SQLHelper {
       expected = Option(date(2015, 3, 18, 12, 3, 17, 456000, zid = zoneId))
       checkStringToTimestamp("2015-03-18T12:03:17.456Z", expected)
       checkStringToTimestamp("2015-03-18 12:03:17.456Z", expected)
+      checkStringToTimestamp("2015-03-18 12:03:17.456UTC", expected)
 
       zoneId = getZoneId("GMT-01:00")
       expected = Option(date(2015, 3, 18, 12, 3, 17, 123000, zid = zoneId))
       checkStringToTimestamp("2015-03-18T12:03:17.123-1:0", expected)
       checkStringToTimestamp("2015-03-18T12:03:17.123-01:00", expected)
+      checkStringToTimestamp("2015-03-18T12:03:17.123GMT-01:00", expected)
 
       zoneId = getZoneId("GMT+07:30")
       expected = Option(date(2015, 3, 18, 12, 3, 17, 123000, zid = zoneId))
       checkStringToTimestamp("2015-03-18T12:03:17.123+07:30", expected)
+      checkStringToTimestamp("2015-03-18T12:03:17.123GMT+07:30", expected)
 
 Review comment:
   can we test some corner cases like `GMT+7:30`?

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-593907829
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-593154893
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-593907829
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-594548368
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-594059452
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/119228/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-594059441
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-594802407
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-594802423
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/119309/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] MaxGekk commented on a change in pull request #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on a change in pull request #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#discussion_r387682760
 
 

 ##########
 File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala
 ##########
 @@ -213,38 +217,30 @@ class DateTimeUtilsSuite extends SparkFunSuite with Matchers with SQLHelper {
       expected = Option(date(2015, 3, 18, 12, 3, 17, 456000, zid = zoneId))
       checkStringToTimestamp("2015-03-18T12:03:17.456Z", expected)
       checkStringToTimestamp("2015-03-18 12:03:17.456Z", expected)
+      checkStringToTimestamp("2015-03-18 12:03:17.456UTC", expected)
 
       zoneId = getZoneId("GMT-01:00")
       expected = Option(date(2015, 3, 18, 12, 3, 17, 123000, zid = zoneId))
       checkStringToTimestamp("2015-03-18T12:03:17.123-1:0", expected)
       checkStringToTimestamp("2015-03-18T12:03:17.123-01:00", expected)
+      checkStringToTimestamp("2015-03-18T12:03:17.123GMT-01:00", expected)
 
       zoneId = getZoneId("GMT+07:30")
       expected = Option(date(2015, 3, 18, 12, 3, 17, 123000, zid = zoneId))
       checkStringToTimestamp("2015-03-18T12:03:17.123+07:30", expected)
+      checkStringToTimestamp("2015-03-18T12:03:17.123GMT+07:30", expected)
 
 Review comment:
   This format is not supported by ZoneId. I put all supported formats to the PR's description:
   ```scala
   scala> getZoneId("GMT+7:30")
   java.time.DateTimeException: Invalid ID for offset-based ZoneId: GMT+7:30
     at java.time.ZoneId.ofWithPrefix(ZoneId.java:437)
     at java.time.ZoneId.of(ZoneId.java:407)
     at java.time.ZoneId.of(ZoneId.java:359)
     at java.time.ZoneId.of(ZoneId.java:315)
     at org.apache.spark.sql.catalyst.util.DateTimeUtils$.getZoneId(DateTimeUtils.scala:57)
     ... 53 elided
   Caused by: java.time.DateTimeException: Invalid ID for ZoneOffset, non numeric characters found: +7:30
     at java.time.ZoneOffset.parseNumber(ZoneOffset.java:269)
     at java.time.ZoneOffset.of(ZoneOffset.java:221)
     at java.time.ZoneId.ofWithPrefix(ZoneId.java:431)
     ... 57 more
   
   scala> getZoneId("GMT+7")
   res5: java.time.ZoneId = GMT+07:00
   
   scala> getZoneId("GMT+07:30")
   res6: java.time.ZoneId = GMT+07:30
   ```

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] MaxGekk commented on a change in pull request #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on a change in pull request #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#discussion_r387759147
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
 ##########
 @@ -242,22 +242,21 @@ object DateTimeUtils {
             return None
           }
         } else if (i == 5 || i == 6) {
-          if (b == 'Z') {
+          if (b == '-' || b == '+') {
             segments(i) = currentSegmentValue
             currentSegmentValue = 0
             i += 1
-            tz = Some(43)
-          } else if (b == '-' || b == '+') {
+            tz = Some(new String(bytes, j, 1))
 
 Review comment:
   Just for consistency with another change

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-594548368
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] SparkQA commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-593910203
 
 
   **[Test build #119228 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119228/testReport)** for PR 27753 at commit [`bdfe5f3`](https://github.com/apache/spark/commit/bdfe5f3f77125d864a19371ecfbff53f06c3e568).

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-594802407
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-593129883
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] SparkQA commented on issue #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-593129753
 
 
   **[Test build #119143 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119143/testReport)** for PR 27753 at commit [`f107331`](https://github.com/apache/spark/commit/f10733147152e0b2ba7e5a298386e15b84eda421).

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#discussion_r387575162
 
 

 ##########
 File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala
 ##########
 @@ -213,38 +217,30 @@ class DateTimeUtilsSuite extends SparkFunSuite with Matchers with SQLHelper {
       expected = Option(date(2015, 3, 18, 12, 3, 17, 456000, zid = zoneId))
       checkStringToTimestamp("2015-03-18T12:03:17.456Z", expected)
       checkStringToTimestamp("2015-03-18 12:03:17.456Z", expected)
+      checkStringToTimestamp("2015-03-18 12:03:17.456UTC", expected)
 
       zoneId = getZoneId("GMT-01:00")
       expected = Option(date(2015, 3, 18, 12, 3, 17, 123000, zid = zoneId))
       checkStringToTimestamp("2015-03-18T12:03:17.123-1:0", expected)
       checkStringToTimestamp("2015-03-18T12:03:17.123-01:00", expected)
+      checkStringToTimestamp("2015-03-18T12:03:17.123GMT-01:00", expected)
 
       zoneId = getZoneId("GMT+07:30")
       expected = Option(date(2015, 3, 18, 12, 3, 17, 123000, zid = zoneId))
       checkStringToTimestamp("2015-03-18T12:03:17.123+07:30", expected)
+      checkStringToTimestamp("2015-03-18T12:03:17.123GMT+07:30", expected)
 
 Review comment:
   can we test some corner cases like `GMT+7:3`?

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-593154893
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-593154894
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/119143/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] SparkQA commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-594057853
 
 
   **[Test build #119228 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119228/testReport)** for PR 27753 at commit [`bdfe5f3`](https://github.com/apache/spark/commit/bdfe5f3f77125d864a19371ecfbff53f06c3e568).
    * 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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-593129888
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/23885/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#discussion_r387575858
 
 

 ##########
 File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala
 ##########
 @@ -213,38 +217,30 @@ class DateTimeUtilsSuite extends SparkFunSuite with Matchers with SQLHelper {
       expected = Option(date(2015, 3, 18, 12, 3, 17, 456000, zid = zoneId))
       checkStringToTimestamp("2015-03-18T12:03:17.456Z", expected)
       checkStringToTimestamp("2015-03-18 12:03:17.456Z", expected)
+      checkStringToTimestamp("2015-03-18 12:03:17.456UTC", expected)
 
       zoneId = getZoneId("GMT-01:00")
       expected = Option(date(2015, 3, 18, 12, 3, 17, 123000, zid = zoneId))
       checkStringToTimestamp("2015-03-18T12:03:17.123-1:0", expected)
       checkStringToTimestamp("2015-03-18T12:03:17.123-01:00", expected)
+      checkStringToTimestamp("2015-03-18T12:03:17.123GMT-01:00", expected)
 
       zoneId = getZoneId("GMT+07:30")
       expected = Option(date(2015, 3, 18, 12, 3, 17, 123000, zid = zoneId))
       checkStringToTimestamp("2015-03-18T12:03:17.123+07:30", expected)
+      checkStringToTimestamp("2015-03-18T12:03:17.123GMT+07:30", expected)
 
-      zoneId = getZoneId("GMT+07:30")
-      expected = Option(date(2015, 3, 18, 12, 3, 17, 123000, zid = zoneId))
-      checkStringToTimestamp("2015-03-18T12:03:17.123+07:30", expected)
-
-      zoneId = getZoneId("GMT+07:30")
       expected = Option(date(2015, 3, 18, 12, 3, 17, 123121, zid = zoneId))
       checkStringToTimestamp("2015-03-18T12:03:17.123121+7:30", expected)
-
-      zoneId = getZoneId("GMT+07:30")
-      expected = Option(date(2015, 3, 18, 12, 3, 17, 123120, zid = zoneId))
 
 Review comment:
   why drop this test? `123120` is different from `123121`

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-595212202
 
 
   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


With regards,
Apache Git Services

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


[GitHub] [spark] SparkQA commented on issue #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
SparkQA commented on issue #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-593154689
 
 
   **[Test build #119143 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119143/testReport)** for PR 27753 at commit [`f107331`](https://github.com/apache/spark/commit/f10733147152e0b2ba7e5a298386e15b84eda421).
    * 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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27753: [WIP][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-593129883
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#discussion_r387716054
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
 ##########
 @@ -242,22 +242,21 @@ object DateTimeUtils {
             return None
           }
         } else if (i == 5 || i == 6) {
-          if (b == 'Z') {
+          if (b == '-' || b == '+') {
             segments(i) = currentSegmentValue
             currentSegmentValue = 0
             i += 1
-            tz = Some(43)
-          } else if (b == '-' || b == '+') {
+            tz = Some(new String(bytes, j, 1))
 
 Review comment:
   why not just `b.toChar.toString`?

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] MaxGekk commented on a change in pull request #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on a change in pull request #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#discussion_r387681063
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
 ##########
 @@ -170,28 +170,28 @@ object DateTimeUtils {
    * `yyyy-[m]m`
    * `yyyy-[m]m-[d]d`
    * `yyyy-[m]m-[d]d `
-   * `yyyy-[m]m-[d]d [h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]`
-   * `yyyy-[m]m-[d]d [h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]Z`
-   * `yyyy-[m]m-[d]d [h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]-[h]h:[m]m`
-   * `yyyy-[m]m-[d]d [h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]+[h]h:[m]m`
-   * `yyyy-[m]m-[d]dT[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]`
-   * `yyyy-[m]m-[d]dT[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]Z`
-   * `yyyy-[m]m-[d]dT[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]-[h]h:[m]m`
-   * `yyyy-[m]m-[d]dT[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]+[h]h:[m]m`
-   * `[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]`
-   * `[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]Z`
-   * `[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]-[h]h:[m]m`
-   * `[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]+[h]h:[m]m`
-   * `T[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]`
-   * `T[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]Z`
-   * `T[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]-[h]h:[m]m`
-   * `T[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]+[h]h:[m]m`
+   * `yyyy-[m]m-[d]d [h]h:[m]m:[s]s.[ms][ms][ms][us][us][us][zone_id]`
+   * `yyyy-[m]m-[d]dT[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us][zone_id]`
+   * `[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us][zone_id]`
+   * `T[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us][zone_id]`
+   *
+   * where `zone_id` should have one of the forms:
+   *   - Z - Zulu time zone UTC+0
+   *   - +|-[h]h:[m]m
 
 Review comment:
   It is required:
   ```scala
   scala> stringToTimestamp(UTF8String.fromString("2020-03-04 10:11:12.00000010:00"), ZoneOffset.UTC)
   res2: Option[org.apache.spark.sql.catalyst.util.DateTimeUtils.SQLTimestamp] = None
   
   scala> stringToTimestamp(UTF8String.fromString("2020-03-04 10:11:12.000000+10:00"), ZoneOffset.UTC)
   res3: Option[org.apache.spark.sql.catalyst.util.DateTimeUtils.SQLTimestamp] = Some(1583280672000000)
   ```

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#discussion_r387573017
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
 ##########
 @@ -170,28 +170,28 @@ object DateTimeUtils {
    * `yyyy-[m]m`
    * `yyyy-[m]m-[d]d`
    * `yyyy-[m]m-[d]d `
-   * `yyyy-[m]m-[d]d [h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]`
-   * `yyyy-[m]m-[d]d [h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]Z`
-   * `yyyy-[m]m-[d]d [h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]-[h]h:[m]m`
-   * `yyyy-[m]m-[d]d [h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]+[h]h:[m]m`
-   * `yyyy-[m]m-[d]dT[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]`
-   * `yyyy-[m]m-[d]dT[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]Z`
-   * `yyyy-[m]m-[d]dT[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]-[h]h:[m]m`
-   * `yyyy-[m]m-[d]dT[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]+[h]h:[m]m`
-   * `[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]`
-   * `[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]Z`
-   * `[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]-[h]h:[m]m`
-   * `[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]+[h]h:[m]m`
-   * `T[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]`
-   * `T[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]Z`
-   * `T[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]-[h]h:[m]m`
-   * `T[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us]+[h]h:[m]m`
+   * `yyyy-[m]m-[d]d [h]h:[m]m:[s]s.[ms][ms][ms][us][us][us][zone_id]`
+   * `yyyy-[m]m-[d]dT[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us][zone_id]`
+   * `[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us][zone_id]`
+   * `T[h]h:[m]m:[s]s.[ms][ms][ms][us][us][us][zone_id]`
+   *
+   * where `zone_id` should have one of the forms:
+   *   - Z - Zulu time zone UTC+0
+   *   - +|-[h]h:[m]m
 
 Review comment:
   is `+` required or optional?

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] AmplabJenkins commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-594548379
 
 
   Test PASSed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/24049/
   Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] MaxGekk commented on a change in pull request #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on a change in pull request #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#discussion_r387690659
 
 

 ##########
 File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala
 ##########
 @@ -213,38 +217,30 @@ class DateTimeUtilsSuite extends SparkFunSuite with Matchers with SQLHelper {
       expected = Option(date(2015, 3, 18, 12, 3, 17, 456000, zid = zoneId))
       checkStringToTimestamp("2015-03-18T12:03:17.456Z", expected)
       checkStringToTimestamp("2015-03-18 12:03:17.456Z", expected)
+      checkStringToTimestamp("2015-03-18 12:03:17.456UTC", expected)
 
       zoneId = getZoneId("GMT-01:00")
       expected = Option(date(2015, 3, 18, 12, 3, 17, 123000, zid = zoneId))
       checkStringToTimestamp("2015-03-18T12:03:17.123-1:0", expected)
       checkStringToTimestamp("2015-03-18T12:03:17.123-01:00", expected)
+      checkStringToTimestamp("2015-03-18T12:03:17.123GMT-01:00", expected)
 
       zoneId = getZoneId("GMT+07:30")
       expected = Option(date(2015, 3, 18, 12, 3, 17, 123000, zid = zoneId))
       checkStringToTimestamp("2015-03-18T12:03:17.123+07:30", expected)
+      checkStringToTimestamp("2015-03-18T12:03:17.123GMT+07:30", expected)
 
-      zoneId = getZoneId("GMT+07:30")
-      expected = Option(date(2015, 3, 18, 12, 3, 17, 123000, zid = zoneId))
-      checkStringToTimestamp("2015-03-18T12:03:17.123+07:30", expected)
-
-      zoneId = getZoneId("GMT+07:30")
       expected = Option(date(2015, 3, 18, 12, 3, 17, 123121, zid = zoneId))
       checkStringToTimestamp("2015-03-18T12:03:17.123121+7:30", expected)
-
-      zoneId = getZoneId("GMT+07:30")
-      expected = Option(date(2015, 3, 18, 12, 3, 17, 123120, zid = zoneId))
 
 Review comment:
   reverted it back, and added more tests

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-594547760
 
 
   **[Test build #119309 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/119309/testReport)** for PR 27753 at commit [`00a07ab`](https://github.com/apache/spark/commit/00a07ab500b63cb13edcd8bf71ad709d008e2d5b).

----------------------------------------------------------------
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


With regards,
Apache Git Services

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


[GitHub] [spark] MaxGekk commented on a change in pull request #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on a change in pull request #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#discussion_r386240731
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
 ##########
 @@ -242,22 +242,21 @@ object DateTimeUtils {
             return None
           }
         } else if (i == 5 || i == 6) {
-          if (b == 'Z') {
+          if (b == '-' || b == '+') {
 
 Review comment:
   `getZoneId()` is able to handle zone offsets w/ prefix `-` and `+` but it doesn't support the format `7:3` like in https://github.com/apache/spark/blob/ffc0935e64ddd56c40db1c1c7f3afb7e5e306861/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuite.scala#L164 . So, I have to keep the code for backward compatibility.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on issue #27753: [SPARK-31005][SQL] Support time zone ids in casting strings to timestamps
URL: https://github.com/apache/spark/pull/27753#issuecomment-594059441
 
 
   Merged build finished. Test PASSed.

----------------------------------------------------------------
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


With regards,
Apache Git Services

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