Zack Behringer created SPARK-25686:
--------------------------------------

             Summary: date_trunc Spark SQL function silently returns null if 
parameters are swapped
                 Key: SPARK-25686
                 URL: https://issues.apache.org/jira/browse/SPARK-25686
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 2.3.1, 2.3.0
            Reporter: Zack Behringer


date_trunc(a_timestamp, 'minute') returns null

date_trunc('minute', a_timestamp) returns a valid timestamp

it would be nice to have a runtime error to help catch the problem

This was not helped by the fact that the doc examples had it swapped, but yes I 
should have tested our use of it more thoroughly



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to