spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dongjoon Hyun (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-15265) Fix Union query error message indentation
Date Wed, 11 May 2016 03:21:12 GMT

     [ https://issues.apache.org/jira/browse/SPARK-15265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dongjoon Hyun updated SPARK-15265:
----------------------------------
    Description: 
This issue fixes the error message indentation consistently with other set queries (EXCEPT/INTERSECT).

**Before (4 lines)**
{code}
scala> sql("(select 1) union (select 1, 2)").head
org.apache.spark.sql.AnalysisException:
Unions can only be performed on tables with the same number of columns,
 but one table has '2' columns and another table has
 '1' columns;
{code}

**After (one-line)**
{code}
scala> sql("(select 1) union (select 1, 2)").head
org.apache.spark.sql.AnalysisException: Unions can only be performed on tables with the same
number of columns, but one table has '2' columns and another table has '1' columns;
{code}

**Reference**
EXCEPT / INTERSECT uses one-line format like the following.
{code}
scala> sql("(select 1) intersect (select 1, 2)").head
org.apache.spark.sql.AnalysisException: Intersect can only be performed on tables with the
same number of columns, but the left table has 1 columns and the right has 2;
{code}


  was:
This issue fixes the error message indentation consistently with other set queries (EXCEPT/INTERSECT).

**Before**
{code}
scala> sql("(select 1) union (select 1, 2)").head
org.apache.spark.sql.AnalysisException:
Unions can only be performed on tables with the same number of columns,
 but one table has '2' columns and another table has
 '1' columns;
{code}

**After**
{code}
scala> sql("(select 1) union (select 1, 2)").head
org.apache.spark.sql.AnalysisException: Unions can only be performed on tables with the same
number of columns, but one table has '2' columns and another table has '1' columns;
{code}

**Reference**
EXCEPT / INTERSECT uses one-line format like the following.
{code}
scala> sql("(select 1) intersect (select 1, 2)").head
org.apache.spark.sql.AnalysisException: Intersect can only be performed on tables with the
same number of columns, but the left table has 1 columns and the right has 2;
{code}



> Fix Union query error message indentation
> -----------------------------------------
>
>                 Key: SPARK-15265
>                 URL: https://issues.apache.org/jira/browse/SPARK-15265
>             Project: Spark
>          Issue Type: Bug
>            Reporter: Dongjoon Hyun
>            Priority: Trivial
>
> This issue fixes the error message indentation consistently with other set queries (EXCEPT/INTERSECT).
> **Before (4 lines)**
> {code}
> scala> sql("(select 1) union (select 1, 2)").head
> org.apache.spark.sql.AnalysisException:
> Unions can only be performed on tables with the same number of columns,
>  but one table has '2' columns and another table has
>  '1' columns;
> {code}
> **After (one-line)**
> {code}
> scala> sql("(select 1) union (select 1, 2)").head
> org.apache.spark.sql.AnalysisException: Unions can only be performed on tables with the
same number of columns, but one table has '2' columns and another table has '1' columns;
> {code}
> **Reference**
> EXCEPT / INTERSECT uses one-line format like the following.
> {code}
> scala> sql("(select 1) intersect (select 1, 2)").head
> org.apache.spark.sql.AnalysisException: Intersect can only be performed on tables with
the same number of columns, but the left table has 1 columns and the right has 2;
> {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


Mime
View raw message