spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dongjoon Hyun (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SPARK-19910) `stack` should not reject NULL values due to type mismatch
Date Fri, 10 Mar 2017 20:57:04 GMT
Dongjoon Hyun created SPARK-19910:
-------------------------------------

             Summary: `stack` should not reject NULL values due to type mismatch
                 Key: SPARK-19910
                 URL: https://issues.apache.org/jira/browse/SPARK-19910
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 2.1.0, 2.0.1, 2.0.0
            Reporter: Dongjoon Hyun


Since `stack` function generates a table with nullable columns, it should allow mixed null
values.

{code}
scala> sql("select stack(3, 1, 2, 3)").printSchema
root
 |-- col0: integer (nullable = true)

scala> sql("select stack(3, 1, 2, null)").printSchema
org.apache.spark.sql.AnalysisException: cannot resolve 'stack(3, 1, 2, NULL)' due to data
type mismatch: Argument 1 (IntegerType) != Argument 3 (NullType); line 1 pos 7;
'Project [unresolvedalias(stack(3, 1, 2, null), None)]
+- OneRowRelation$
{code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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


Mime
View raw message