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/06/29 15:25:10 UTC

[GitHub] [spark] gengliangwang opened a new pull request #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

gengliangwang opened a new pull request #33136:
URL: https://github.com/apache/spark/pull/33136


   <!--
   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'.
     8. If you want to add or modify an error message, please read the guideline first:
        https://spark.apache.org/error-message-guidelines.html
   -->
   
   ### 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.
   -->
   Support extracting hour/minute/second fields from timestamp without time zone values. In details, the following syntaxes are supported:
   1. extract [hour | minute | second] from timestampWithoutTZ
   2. date_part('[hour | minute | second]', timestampWithoutTZ)
   3. hour(timestampWithoutTZ)
   4. minute(timestampWithoutTZ)
   5. second(timestampWithoutTZ)
   
   ### 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.
   -->
   Support basic operations for the new timestamp type.
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   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 possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   No, the timestamp without time zone type is not release yet.
   
   
   ### 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.
   -->
   Unit test


-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44951/
   


-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


   **[Test build #140356 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/140356/testReport)** for PR 33136 at commit [`877d150`](https://github.com/apache/spark/commit/877d1504ce6118a8c494ad1491c517d61214827e).
    * This patch **fails Spark unit tests**.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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] gengliangwang commented on a change in pull request #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

Posted by GitBox <gi...@apache.org>.
gengliangwang commented on a change in pull request #33136:
URL: https://github.com/apache/spark/pull/33136#discussion_r661293657



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/AnsiTypeCoercion.scala
##########
@@ -189,6 +189,7 @@ object AnsiTypeCoercion extends TypeCoercionBase {
         }
 
       case (DateType, TimestampType) => Some(TimestampType)
+      case (DateType, AnyTimestampType) => Some(TimestampType)

Review comment:
       I just change the default concrete type of AnyTimestampType to TimestampType, which makes more sense.




-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


   Kubernetes integration test status success
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44951/
   


-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #33136:
URL: https://github.com/apache/spark/pull/33136#discussion_r661248157



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/AnsiTypeCoercion.scala
##########
@@ -189,6 +189,7 @@ object AnsiTypeCoercion extends TypeCoercionBase {
         }
 
       case (DateType, TimestampType) => Some(TimestampType)
+      case (DateType, AnyTimestampType) => Some(TimestampType)

Review comment:
       shall we use `AnyTimestampType.defaultConcreteType`?




-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


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


-- 
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] gengliangwang commented on a change in pull request #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

Posted by GitBox <gi...@apache.org>.
gengliangwang commented on a change in pull request #33136:
URL: https://github.com/apache/spark/pull/33136#discussion_r661253431



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/AnsiTypeCoercion.scala
##########
@@ -189,6 +189,7 @@ object AnsiTypeCoercion extends TypeCoercionBase {
         }
 
       case (DateType, TimestampType) => Some(TimestampType)

Review comment:
       Well we can have it but it is not related to this PR and there is no test case for the 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.

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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


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


-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


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


-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #33136:
URL: https://github.com/apache/spark/pull/33136#discussion_r661468789



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala
##########
@@ -961,13 +961,15 @@ object TypeCoercion extends TypeCoercionBase {
 
       // Implicit cast between date time types
       case (DateType, TimestampType) => TimestampType
+      case (DateType, AnyTimestampType) => TimestampType

Review comment:
       here should be `AnyTimestampType.defaultConcreteType` as well




-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


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


-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


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


-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44941/
   


-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


   **[Test build #140437 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/140437/testReport)** for PR 33136 at commit [`c206f2a`](https://github.com/apache/spark/commit/c206f2a9d05a3413494e6634c48d84cfc396225c).


-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


   **[Test build #140437 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/140437/testReport)** for PR 33136 at commit [`c206f2a`](https://github.com/apache/spark/commit/c206f2a9d05a3413494e6634c48d84cfc396225c).
    * 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] AmplabJenkins commented on pull request #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


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


-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


   **[Test build #140437 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/140437/testReport)** for PR 33136 at commit [`c206f2a`](https://github.com/apache/spark/commit/c206f2a9d05a3413494e6634c48d84cfc396225c).


-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


   **[Test build #140356 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/140356/testReport)** for PR 33136 at commit [`877d150`](https://github.com/apache/spark/commit/877d1504ce6118a8c494ad1491c517d61214827e).


-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


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


-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #33136:
URL: https://github.com/apache/spark/pull/33136#discussion_r661246601



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/AnsiTypeCoercion.scala
##########
@@ -189,6 +189,7 @@ object AnsiTypeCoercion extends TypeCoercionBase {
         }
 
       case (DateType, TimestampType) => Some(TimestampType)

Review comment:
       shall we support Date -> Timestamp NTZ? in case we have such functions in the future.




-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


   Kubernetes integration test status success
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44941/
   


-- 
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] gengliangwang commented on a change in pull request #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

Posted by GitBox <gi...@apache.org>.
gengliangwang commented on a change in pull request #33136:
URL: https://github.com/apache/spark/pull/33136#discussion_r661294955



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala
##########
@@ -639,8 +639,8 @@ abstract class TypeCoercionBase {
         s.copy(right = Cast(s.right, s.left.dataType))
       case s @ SubtractTimestamps(AnyTimestampType(), AnyTimestampType(), _, _)
         if s.left.dataType != s.right.dataType =>
-        val newLeft = castIfNotSameType(s.left, AnyTimestampType.defaultConcreteType)
-        val newRight = castIfNotSameType(s.right, AnyTimestampType.defaultConcreteType)
+        val newLeft = castIfNotSameType(s.left, TimestampWithoutTZType)

Review comment:
       Here the result is the same if casting both to `TimestampWithoutTZType` or `TimestampType`.  Casting to TimestampWithoutTZType is more straightforward.




-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


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


-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #33136:
URL: https://github.com/apache/spark/pull/33136#discussion_r661246040



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/AnsiTypeCoercion.scala
##########
@@ -189,6 +189,7 @@ object AnsiTypeCoercion extends TypeCoercionBase {
         }
 
       case (DateType, TimestampType) => Some(TimestampType)

Review comment:
       shall we remove this line?




-- 
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] gengliangwang closed pull request #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

Posted by GitBox <gi...@apache.org>.
gengliangwang closed pull request #33136:
URL: https://github.com/apache/spark/pull/33136


   


-- 
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] gengliangwang commented on a change in pull request #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

Posted by GitBox <gi...@apache.org>.
gengliangwang commented on a change in pull request #33136:
URL: https://github.com/apache/spark/pull/33136#discussion_r661475310



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala
##########
@@ -961,13 +961,15 @@ object TypeCoercion extends TypeCoercionBase {
 
       // Implicit cast between date time types
       case (DateType, TimestampType) => TimestampType
+      case (DateType, AnyTimestampType) => TimestampType

Review comment:
       I will address this in the PR for extracting date fields.




-- 
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] gengliangwang commented on a change in pull request #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

Posted by GitBox <gi...@apache.org>.
gengliangwang commented on a change in pull request #33136:
URL: https://github.com/apache/spark/pull/33136#discussion_r660729422



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala
##########
@@ -968,6 +968,7 @@ object TypeCoercion extends TypeCoercionBase {
       case (StringType, target: NumericType) => target
       case (StringType, DateType) => DateType
       case (StringType, TimestampType) => TimestampType
+      case (StringType, AnyTimestampType) => TimestampType

Review comment:
       We need this for the default implicit cast from string to timestamp type. This regression is found on running extract.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] gengliangwang commented on a change in pull request #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

Posted by GitBox <gi...@apache.org>.
gengliangwang commented on a change in pull request #33136:
URL: https://github.com/apache/spark/pull/33136#discussion_r661256035



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/AnsiTypeCoercion.scala
##########
@@ -189,6 +189,7 @@ object AnsiTypeCoercion extends TypeCoercionBase {
         }
 
       case (DateType, TimestampType) => Some(TimestampType)
+      case (DateType, AnyTimestampType) => Some(TimestampType)

Review comment:
       The default concrete type is TimestampWithoutTZType. The current code is not ready for that yet. 
   There will be a new flag for the default timestamp type in SQL. Let's revisit this 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.

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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


   **[Test build #140426 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/140426/testReport)** for PR 33136 at commit [`0596534`](https://github.com/apache/spark/commit/05965340184900acddd043a7d453741dd148e9bb).
    * 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] gengliangwang commented on pull request #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


   Merging to master


-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


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


-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


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


-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


   **[Test build #140426 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/140426/testReport)** for PR 33136 at commit [`0596534`](https://github.com/apache/spark/commit/05965340184900acddd043a7d453741dd148e9bb).


-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


   **[Test build #140356 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/140356/testReport)** for PR 33136 at commit [`877d150`](https://github.com/apache/spark/commit/877d1504ce6118a8c494ad1491c517d61214827e).


-- 
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 #33136: [SPARK-35932][SQL] Support extracting hour/minute/second from timestamp without time zone

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


   **[Test build #140426 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/140426/testReport)** for PR 33136 at commit [`0596534`](https://github.com/apache/spark/commit/05965340184900acddd043a7d453741dd148e9bb).


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