You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "ABHISHEK KUMAR GUPTA (Jira)" <ji...@apache.org> on 2019/11/14 13:17:00 UTC

[jira] [Created] (SPARK-29897) Implicit cast to timestamp is failing

ABHISHEK KUMAR GUPTA created SPARK-29897:
--------------------------------------------

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


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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org