diff options
author | Dongjoon Hyun <dongjoon@apache.org> | 2016-07-14 17:18:34 +0200 |
---|---|---|
committer | Herman van Hovell <hvanhovell@databricks.com> | 2016-07-14 17:18:34 +0200 |
commit | 56183b84fb64ea13977d89ec55a9dd3997b4dacf (patch) | |
tree | 041dc3bc4a343404ec8d4d1f5124df0691ba1eb2 /R | |
parent | 1b5c9e52a7d5cdd3b4da1334ddff0518a8e14505 (diff) | |
download | spark-56183b84fb64ea13977d89ec55a9dd3997b4dacf.tar.gz spark-56183b84fb64ea13977d89ec55a9dd3997b4dacf.tar.bz2 spark-56183b84fb64ea13977d89ec55a9dd3997b4dacf.zip |
[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 uses `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.
Author: Dongjoon Hyun <dongjoon@apache.org>
Closes #14199 from dongjoon-hyun/SPARK-16543.
Diffstat (limited to 'R')
0 files changed, 0 insertions, 0 deletions