You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2016/04/29 00:08:12 UTC
[jira] [Commented] (SPARK-14990) nvl, coalesce, array functions
with parameter of type "array"
[ https://issues.apache.org/jira/browse/SPARK-14990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15263127#comment-15263127 ]
Apache Spark commented on SPARK-14990:
--------------------------------------
User 'dosoft' has created a pull request for this issue:
https://github.com/apache/spark/pull/12768
> nvl, coalesce, array functions with parameter of type "array"
> -------------------------------------------------------------
>
> Key: SPARK-14990
> URL: https://issues.apache.org/jira/browse/SPARK-14990
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 1.6.1
> Reporter: Oleg Danilov
> Priority: Minor
>
> Steps to reproduce:
> 1. create table tmp(col1 int, col2 array<int>)
> 2. insert values:
> {code}
> 1, [1]
> 2, [2]
> 3, NULL
> {code}
> 3. run query
> select col1, coalesce(col2, array(1,2,3)) from tmp;
> Expected result:
> {code}
> 1, [1]
> 2, [2]
> 3, [1,2,3]
> {code}
> Current result:
> {code}
> Error: org.apache.spark.sql.AnalysisException: cannot resolve 'coalesce(col2,array(1,2,3))' due to data type mismatch: input to function coalesce should all be the same type, but it's [array<int>, array<int>]; line 1 pos 38 (state=,code=0)
> {code}
> The fix seems to be pretty easy, will create a PR soon.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org