GitHub user dongjoon-hyun opened a pull request:

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

    [SPARK-16543][SQL] Rename the columns of `SHOW PARTITION/COLUMNS` commands

    ## What changes were proposed in this pull request?
    
    This PR changes the name of columns returned by `SHOW PARTITION` and `SHOW 
COLUMNS` commands. Currently, both commands uses `result` as a column name.
    
    **Comparison: Column Name**
    
    Command|Spark(Before)|Spark(After)|Hive
    ----------|--------------|------------|-----
    SHOW PARTITIONS|result|partition|partition
    SHOW COLUMNS|result|col_name|field
    
    Note that Spark/Hive show `col_name` in `DESC TABLES`. So, this PR chooses 
`col_name` for consistency among Spark commands.
    
    **Before**
    ```scala
    scala> sql("show partitions p").show()
    +------+
    |result|
    +------+
    |   b=2|
    +------+
    
    scala> sql("show columns in p").show()
    +------+
    |result|
    +------+
    |     a|
    |     b|
    +------+
    ```
    
    **After**
    ```scala
    scala> sql("show partitions p").show
    +---------+
    |partition|
    +---------+
    |      b=2|
    +---------+
    
    scala> sql("show columns in p").show
    +--------+
    |col_name|
    +--------+
    |       a|
    |       b|
    +--------+
    ```
    
    ## 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-16543

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

    https://github.com/apache/spark/pull/14199.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 #14199
    
----
commit 1f6ba91714292a9eab5a360ff382f97089c573d5
Author: Dongjoon Hyun <[email protected]>
Date:   2016-07-14T09:39:10Z

    [SPARK-16543][SQL] Rename the columns of `SHOW PARTITION/COLUMNS` commands

----


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