You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Oleg Danilov (JIRA)" <ji...@apache.org> on 2016/04/28 23:59:12 UTC
[jira] [Created] (SPARK-14990) nvl, coalesce, array functions with
parameter of type "array"
Oleg Danilov created SPARK-14990:
------------------------------------
Summary: 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