GitHub user dongjoon-hyun opened a pull request:

    https://github.com/apache/spark/pull/13043

    [SPARK-15265][SQL] Fix Union query error message indentation

    ## What changes were proposed in this pull request?
    
    This issue fixes the error message indentation consistently with other set 
queries (EXCEPT/INTERSECT).
    
    **Before (4 lines)**
    ```
    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;
    ```
    
    **After (one-line)**
    ```
    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;
    ```
    **Reference (EXCEPT / INTERSECT)**
    ```
    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;
    ```
    
    ## How was this patch tested?
    
    Manual.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dongjoon-hyun/spark SPARK-15265

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/13043.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #13043
    
----
commit c102d4d393c5ea6921a674df6a3433ccff959395
Author: Dongjoon Hyun <[email protected]>
Date:   2016-05-11T03:20:50Z

    [SPARK-15265][SQL] Fix Union query error message indentation

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to