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 2017/03/10 20:57:04 UTC
[jira] [Created] (SPARK-19910) `stack` should not reject NULL
values due to type mismatch
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