[
https://issues.apache.org/jira/browse/SPARK-19910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15998771#comment-15998771
]
Dongjoon Hyun commented on SPARK-19910:
---------------------------------------
Hi, [~cloud_fan] and [~smilegator].
Could you review this issue and PR?
> `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.0.0, 2.0.1, 2.1.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: [email protected]
For additional commands, e-mail: [email protected]