Kent Yao created SPARK-29888:
--------------------------------

             Summary: New interval string parser parse '.111 seconds' to null 
                 Key: SPARK-29888
                 URL: https://issues.apache.org/jira/browse/SPARK-29888
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 3.0.0
            Reporter: Kent Yao


Current string to interval cast logic does not support i.e. cast('.111 second' 
as interval) which will fail in SIGN state and return null, actually, it is 
00:00:00.111. 


{code:java}
These are the results of the master branch.

-- !query 63
select interval '.111 seconds'
-- !query 63 schema
struct<0.111 seconds:interval>
-- !query 63 output
0.111 seconds


-- !query 64
select cast('.111 seconds' as interval)
-- !query 64 schema
struct<CAST(.111 seconds AS INTERVAL):interval>
-- !query 64 output
NULL
{code}




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

Reply via email to