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/07/26 00:13:20 UTC
[jira] [Commented] (SPARK-16726) Improve error message for `Union`
queries for incompatible types
[ https://issues.apache.org/jira/browse/SPARK-16726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15392899#comment-15392899 ]
Apache Spark commented on SPARK-16726:
--------------------------------------
User 'dongjoon-hyun' has created a pull request for this issue:
https://github.com/apache/spark/pull/14355
> 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