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

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

Maxim Gekk created SPARK-29187:
----------------------------------

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


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