Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Jul 14, 2016

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> sql("show partitions p").show()
+------+
|result|
+------+
|   b=2|
+------+

scala> sql("show columns in p").show()
+------+
|result|
+------+
|     a|
|     b|
+------+

After

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.

@SparkQA
Copy link

SparkQA commented Jul 14, 2016

Test build #62307 has finished for PR 14199 at commit 1f6ba91.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@hvanhovell
Copy link
Contributor

LGTM - merging to master. Thanks.

@asfgit asfgit closed this in 56183b8 Jul 14, 2016
@dongjoon-hyun
Copy link
Member Author

Thank you, @hvanhovell

@dongjoon-hyun dongjoon-hyun deleted the SPARK-16543 branch July 20, 2016 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants