[ 
https://issues.apache.org/jira/browse/SPARK-25686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16646394#comment-16646394
 ] 

Zack Behringer commented on SPARK-25686:
----------------------------------------

OK, I thought that might be the case

> 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.0, 2.3.1
>            Reporter: Zack Behringer
>            Priority: Minor
>
> 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: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to