You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dylan Guedes (JIRA)" <ji...@apache.org> on 2019/07/17 18:16:00 UTC

[jira] [Created] (SPARK-28429) SQL Datetime util function being casted to double instead of timestamp

Dylan Guedes created SPARK-28429:
------------------------------------

             Summary: SQL Datetime util function being casted to double instead of timestamp
                 Key: SPARK-28429
                 URL: https://issues.apache.org/jira/browse/SPARK-28429
             Project: Spark
          Issue Type: Sub-task
          Components: SQL, Tests
    Affects Versions: 3.0.0
            Reporter: Dylan Guedes


In the code below, 'now()+'100 days' are casted to double and then an error is thrown:
{code:sql}
CREATE TEMP VIEW v_window AS
SELECT i, min(i) over (order by i range between '1 day' preceding and '10 days' following) as min_i
FROM range(now(), now()+'100 days', '1 hour') i;
{code}
Error:

{code:sql}
cannot resolve '(current_timestamp() + CAST('100 days' AS DOUBLE))' due to data type mismatch: differing      types in '(current_timestamp() + CAST('100 days' AS DOUBLE))' (timestamp and double).;{code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

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