You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Marco Gaido (JIRA)" <ji...@apache.org> on 2018/10/11 07:51:00 UTC

[jira] [Commented] (SPARK-25686) date_trunc Spark SQL function silently returns null if parameters are swapped

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

Marco Gaido commented on SPARK-25686:
-------------------------------------

I am closing this as it is a duplicate of SPARK-24378. Thanks for reporting anyway.

> 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org