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/10/30 08:58:25 UTC

[GitHub] [spark] AngersZhuuuu opened a new pull request #34448: [SPARK-37169][SQL] Fix un-correct cast value when cast DateType to NumericType

AngersZhuuuu opened a new pull request #34448:
URL: https://github.com/apache/spark/pull/34448


   ### What changes were proposed in this pull request?
   In current Spark, when cast DateType to NumericType such as `cast(date'2020-01-01' as long)`, it will return `null` value, in this pr we fix this un-correct result.
   
   ### Why are the changes needed?
   Fix bug
   
   ### Does this PR introduce _any_ user-facing change?
   User can cast DateType to NumericType with correct result.
   
   ### How was this patch tested?
   added UT
   


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   **[Test build #144995 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144995/testReport)** for PR 34448 at commit [`7d0977c`](https://github.com/apache/spark/commit/7d0977cf8553ff8e2d480920edd534a59a226e5f).


-- 
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] AngersZhuuuu commented on pull request #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   > @AngersZhuuuu A little confusion, The ansi sql does not allow cast Date to numeric? I might be missing something? 
   
   Supported now. https://github.com/apache/spark/pull/34459/files


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   **[Test build #145002 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145002/testReport)** for PR 34448 at commit [`8e7cca0`](https://github.com/apache/spark/commit/8e7cca0a5608ca3dd4a6437d999f1323bf9fa40c).
    * This patch **fails to build**.
    * 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] SparkQA commented on pull request #34448: [SPARK-37169][SQL] Fix un-correct cast value when cast DateType to NumericType

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


   **[Test build #144778 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144778/testReport)** for PR 34448 at commit [`ccc9779`](https://github.com/apache/spark/commit/ccc977950f1e3d880f463139643ce70d37526c88).
    * 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] AmplabJenkins commented on pull request #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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] Peng-Lei commented on pull request #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

Posted by GitBox <gi...@apache.org>.
Peng-Lei commented on pull request #34448:
URL: https://github.com/apache/spark/pull/34448#issuecomment-955889089


   @AngersZhuuuu A little confusion, The ansi sql does not allow cast Date to numeric? I might be missing something?
   ![1](https://user-images.githubusercontent.com/41178002/139616433-cbd4f72d-e36b-420a-a514-212483a02ca4.PNG)
   
   


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix un-correct cast value when cast DateType to NumericType

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


   **[Test build #144778 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144778/testReport)** for PR 34448 at commit [`ccc9779`](https://github.com/apache/spark/commit/ccc977950f1e3d880f463139643ce70d37526c88).


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   **[Test build #144995 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144995/testReport)** for PR 34448 at commit [`7d0977c`](https://github.com/apache/spark/commit/7d0977cf8553ff8e2d480920edd534a59a226e5f).
    * 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] AmplabJenkins removed a comment on pull request #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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






-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   **[Test build #145068 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145068/testReport)** for PR 34448 at commit [`c2d4d47`](https://github.com/apache/spark/commit/c2d4d47c7e5c89dea0ba2eb61e1e7e9c148c6d62).
    * 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] SparkQA removed a comment on pull request #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   **[Test build #145068 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145068/testReport)** for PR 34448 at commit [`c2d4d47`](https://github.com/apache/spark/commit/c2d4d47c7e5c89dea0ba2eb61e1e7e9c148c6d62).


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   > also ping @gengliangwang Since you have enable cast from date to numeric
   
   I just added an option for enabling datetime <=> numeric, which is disabled by default. 
   It's not clear about the numeric value should be microseconds or seconds or days. I don't think we should change the behavior here. 


-- 
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 #34448: [SPARK-37169][SQL] Fix un-correct cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix un-correct cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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] AngersZhuuuu closed pull request #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   **[Test build #144786 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144786/testReport)** for PR 34448 at commit [`7d0977c`](https://github.com/apache/spark/commit/7d0977cf8553ff8e2d480920edd534a59a226e5f).
    * 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 removed a comment on pull request #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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] AngersZhuuuu commented on pull request #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   ping @cloud-fan 


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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






-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
##########
@@ -610,7 +610,7 @@ abstract class CastBase extends UnaryExpression with TimeZoneAwareExpression wit
     case BooleanType =>
       buildCast[Boolean](_, b => if (b) 1L else 0L)
     case DateType =>
-      buildCast[Int](_, d => null)
+      buildCast[Int](_, d => timestampToLong(daysToMicros(d, zoneId)))

Review comment:
       This will overflow in year 2039




-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   **[Test build #144996 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144996/testReport)** for PR 34448 at commit [`7d0977c`](https://github.com/apache/spark/commit/7d0977cf8553ff8e2d480920edd534a59a226e5f).


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   **[Test build #145003 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145003/testReport)** for PR 34448 at commit [`b901a97`](https://github.com/apache/spark/commit/b901a972bfd64a2f41183dec287908135b8e4d71).


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   **[Test build #144996 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144996/testReport)** for PR 34448 at commit [`7d0977c`](https://github.com/apache/spark/commit/7d0977cf8553ff8e2d480920edd534a59a226e5f).


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
##########
@@ -620,8 +620,17 @@ abstract class CastBase extends UnaryExpression with TimeZoneAwareExpression wit
       buildCast[UTF8String](_, s => if (s.toInt(result)) result.value else null)
     case BooleanType =>
       buildCast[Boolean](_, b => if (b) 1 else 0)
+    case DateType if ansiEnabled =>

Review comment:
       This cast s not allowed in ANSI mode, why do we need this code path?




-- 
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] AngersZhuuuu commented on a change in pull request #34448: [SPARK-37169][SQL] Fix un-correct cast value when cast DateType to NumericType

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
##########
@@ -620,8 +620,17 @@ abstract class CastBase extends UnaryExpression with TimeZoneAwareExpression wit
       buildCast[UTF8String](_, s => if (s.toInt(result)) result.value else null)
     case BooleanType =>
       buildCast[Boolean](_, b => if (b) 1 else 0)
+    case DateType if ansiEnabled =>

Review comment:
       > I might be missing something but will this branch ever execute? the case DateType above would seem to cover this case too
   
   All handle like timestamp type, cc @cloud-fan 




-- 
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] srowen commented on a change in pull request #34448: [SPARK-37169][SQL] Fix un-correct cast value when cast DateType to NumericType

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
##########
@@ -620,8 +620,17 @@ abstract class CastBase extends UnaryExpression with TimeZoneAwareExpression wit
       buildCast[UTF8String](_, s => if (s.toInt(result)) result.value else null)
     case BooleanType =>
       buildCast[Boolean](_, b => if (b) 1 else 0)
+    case DateType if ansiEnabled =>

Review comment:
       I might be missing something but will this branch ever execute? the case DateType above would seem to cover this case too




-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
##########
@@ -620,8 +620,17 @@ abstract class CastBase extends UnaryExpression with TimeZoneAwareExpression wit
       buildCast[UTF8String](_, s => if (s.toInt(result)) result.value else null)
     case BooleanType =>
       buildCast[Boolean](_, b => if (b) 1 else 0)
+    case DateType if ansiEnabled =>

Review comment:
       This cast s not allowed in ANSI mode, why do we need this code path?




-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   **[Test build #145002 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145002/testReport)** for PR 34448 at commit [`8e7cca0`](https://github.com/apache/spark/commit/8e7cca0a5608ca3dd4a6437d999f1323bf9fa40c).


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   **[Test build #145068 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145068/testReport)** for PR 34448 at commit [`c2d4d47`](https://github.com/apache/spark/commit/c2d4d47c7e5c89dea0ba2eb61e1e7e9c148c6d62).


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   **[Test build #145003 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145003/testReport)** for PR 34448 at commit [`b901a97`](https://github.com/apache/spark/commit/b901a972bfd64a2f41183dec287908135b8e4d71).


-- 
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 #34448: [SPARK-37169][SQL] Fix un-correct cast value when cast DateType to NumericType

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


   **[Test build #144778 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144778/testReport)** for PR 34448 at commit [`ccc9779`](https://github.com/apache/spark/commit/ccc977950f1e3d880f463139643ce70d37526c88).


-- 
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 #34448: [SPARK-37169][SQL] Fix un-correct cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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] AngersZhuuuu commented on pull request #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   also ping @gengliangwang  Since you have enable cast from date to numeric


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   **[Test build #145003 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145003/testReport)** for PR 34448 at commit [`b901a97`](https://github.com/apache/spark/commit/b901a972bfd64a2f41183dec287908135b8e4d71).
    * 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] SparkQA commented on pull request #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   **[Test build #144996 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144996/testReport)** for PR 34448 at commit [`7d0977c`](https://github.com/apache/spark/commit/7d0977cf8553ff8e2d480920edd534a59a226e5f).
    * 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] AmplabJenkins commented on pull request #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
##########
@@ -620,8 +620,17 @@ abstract class CastBase extends UnaryExpression with TimeZoneAwareExpression wit
       buildCast[UTF8String](_, s => if (s.toInt(result)) result.value else null)
     case BooleanType =>
       buildCast[Boolean](_, b => if (b) 1 else 0)
+    case DateType if ansiEnabled =>

Review comment:
       This cast s not allowed in ANSI mode, why do we need this code path?




-- 
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 #34448: [SPARK-37169][SQL] Fix un-correct cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix un-correct cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   Kubernetes integration test unable to build dist.
   
   exiting with code: 1
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49474/
   


-- 
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 #34448: [SPARK-37169][SQL] Fix un-correct cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   **[Test build #144786 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144786/testReport)** for PR 34448 at commit [`7d0977c`](https://github.com/apache/spark/commit/7d0977cf8553ff8e2d480920edd534a59a226e5f).


-- 
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 #34448: [SPARK-37169][SQL] Fix un-correct cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix un-correct cast value when cast DateType to NumericType

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


   **[Test build #144786 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144786/testReport)** for PR 34448 at commit [`7d0977c`](https://github.com/apache/spark/commit/7d0977cf8553ff8e2d480920edd534a59a226e5f).


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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] AngersZhuuuu commented on pull request #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   retest this please


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


-- 
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] AngersZhuuuu commented on pull request #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


   ping @cloud-fan 


-- 
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 #34448: [SPARK-37169][SQL] Fix incorrect cast value when cast DateType to NumericType

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


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


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