[jira] [Commented] (SPARK-29897) Implicit cast to timestamp is failing
[ https://issues.apache.org/jira/browse/SPARK-29897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17130445#comment-17130445 ] Bart Samwel commented on SPARK-29897: - This won't be done because the string's type is ambiguous – it could be timestamp or interval. > Implicit cast to timestamp is failing > -- > > Key: SPARK-29897 > URL: https://issues.apache.org/jira/browse/SPARK-29897 > Project: Spark > Issue Type: Bug > Components: SQL >Affects Versions: 3.0.0 >Reporter: ABHISHEK KUMAR GUPTA >Priority: Minor > > Spark can not cast implicitly > jdbc:hive2://10.18.19.208:23040/default> SELECT EXTRACT(DAY FROM NOW() - > '2014-08-02 08:10:56'); > Error: org.apache.spark.sql.AnalysisException: cannot resolve > '(current_timestamp() - CAST('2014-08-02 08:10:56' AS DOUBLE))' due to data > type mismatch: differing types in '(current_timestamp() - CAST('2014-08-02 > 08:10:56' AS DOUBLE))' (timestamp and double).; line 1 pos 24; > PostgreSQL and MySQL can handle the same. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-29897) Implicit cast to timestamp is failing
[ https://issues.apache.org/jira/browse/SPARK-29897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17123497#comment-17123497 ] Apache Spark commented on SPARK-29897: -- User 'sathyaprakashg' has created a pull request for this issue: https://github.com/apache/spark/pull/28703 > Implicit cast to timestamp is failing > -- > > Key: SPARK-29897 > URL: https://issues.apache.org/jira/browse/SPARK-29897 > Project: Spark > Issue Type: Bug > Components: SQL >Affects Versions: 3.0.0 >Reporter: ABHISHEK KUMAR GUPTA >Priority: Minor > > Spark can not cast implicitly > jdbc:hive2://10.18.19.208:23040/default> SELECT EXTRACT(DAY FROM NOW() - > '2014-08-02 08:10:56'); > Error: org.apache.spark.sql.AnalysisException: cannot resolve > '(current_timestamp() - CAST('2014-08-02 08:10:56' AS DOUBLE))' due to data > type mismatch: differing types in '(current_timestamp() - CAST('2014-08-02 > 08:10:56' AS DOUBLE))' (timestamp and double).; line 1 pos 24; > PostgreSQL and MySQL can handle the same. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-29897) Implicit cast to timestamp is failing
[ https://issues.apache.org/jira/browse/SPARK-29897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16974789#comment-16974789 ] Ankit Raj Boudh commented on SPARK-29897: - i will raise PR for this > Implicit cast to timestamp is failing > -- > > Key: SPARK-29897 > URL: https://issues.apache.org/jira/browse/SPARK-29897 > Project: Spark > Issue Type: Bug > Components: SQL >Affects Versions: 3.0.0 >Reporter: ABHISHEK KUMAR GUPTA >Priority: Minor > > Spark can not cast implicitly > jdbc:hive2://10.18.19.208:23040/default> SELECT EXTRACT(DAY FROM NOW() - > '2014-08-02 08:10:56'); > Error: org.apache.spark.sql.AnalysisException: cannot resolve > '(current_timestamp() - CAST('2014-08-02 08:10:56' AS DOUBLE))' due to data > type mismatch: differing types in '(current_timestamp() - CAST('2014-08-02 > 08:10:56' AS DOUBLE))' (timestamp and double).; line 1 pos 24; > PostgreSQL and MySQL can handle the same. -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org