spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-14990) nvl, coalesce, array functions with parameter of type "array"
Date Fri, 20 May 2016 01:34:12 GMT

    [ https://issues.apache.org/jira/browse/SPARK-14990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15292524#comment-15292524
] 

Apache Spark commented on SPARK-14990:
--------------------------------------

User 'rxin' has created a pull request for this issue:
https://github.com/apache/spark/pull/13208

> 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


Mime
View raw message