GitHub user dongjoon-hyun opened a pull request:
https://github.com/apache/spark/pull/17251
[SPARK-19910][SQL] `stack` should not reject NULL values due to type
mismatch
## What changes were proposed in this pull request?
Since `stack` function generates a table with nullable columns, it should
allow mixed null values.
```scala
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;
```
## How was this patch tested?
Pass the Jenkins with a new test case.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/dongjoon-hyun/spark SPARK-19910
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/17251.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #17251
----
commit 26828d57fe6faf26ccc36fa83f7686436f99f767
Author: Dongjoon Hyun <[email protected]>
Date: 2017-03-10T21:09:18Z
[SPARK-19910][SQL] `stack` should not reject NULL values due to type
mismatch
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]