You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dongjoon Hyun (Jira)" <ji...@apache.org> on 2019/09/21 03:30:00 UTC

[jira] [Resolved] (SPARK-29187) Return null from `date_part()` for the null `field`

     [ https://issues.apache.org/jira/browse/SPARK-29187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dongjoon Hyun resolved SPARK-29187.
-----------------------------------
    Fix Version/s: 3.0.0
       Resolution: Fixed

Issue resolved by pull request 25865
[https://github.com/apache/spark/pull/25865]

> Return null from `date_part()` for the null `field`
> ---------------------------------------------------
>
>                 Key: SPARK-29187
>                 URL: https://issues.apache.org/jira/browse/SPARK-29187
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Maxim Gekk
>            Assignee: Maxim Gekk
>            Priority: Minor
>             Fix For: 3.0.0
>
>
> PostgreSQL return NULL for the NULL field from the date_part() function:
> {code}
> maxim=# select date_part(null, date'2019-09-20');
>  date_part 
> -----------
>           
> (1 row)
> {code}
> but Spark fails with the error:
> {code}
> spark-sql> select date_part(null, date'2019-09-20');
> Error in query: null; line 1 pos 7
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org