spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dylan Guedes (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SPARK-28429) SQL Datetime util function being casted to double instead of timestamp
Date Wed, 17 Jul 2019 18:16:00 GMT
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


Mime
View raw message