You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dongjoon Hyun (JIRA)" <ji...@apache.org> on 2016/07/26 00:10:20 UTC

[jira] [Created] (SPARK-16726) Improve error message for `Union` queries for incompatible types

Dongjoon Hyun created SPARK-16726:
-------------------------------------

             Summary: Improve error message for `Union` queries for incompatible types
                 Key: SPARK-16726
                 URL: https://issues.apache.org/jira/browse/SPARK-16726
             Project: Spark
          Issue Type: Improvement
            Reporter: Dongjoon Hyun
            Priority: Minor


Currently, `UNION` query on incompatible types shows a misleading error message, e.g., `unresolved operator Union`. We had better show a more correct message.

h4. Before
{code}
scala> sql("select 1 union (select array(1))")
org.apache.spark.sql.AnalysisException: unresolved operator 'Union;
{code}

h4. After
{code}
scala> sql("select 1 union (select array(1))")
org.apache.spark.sql.AnalysisException: Unions can only be performed on tables with the compatible column types, but one table has '[IntegerType]' and another table has '[ArrayType(IntegerType,false)]';
{code}




--
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