Skip to content

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

Closed
dongjoon-hyun wants to merge 1 commit into
apache:masterfrom
dongjoon-hyun:SPARK-16543
Closed

[SPARK-16543][SQL] Rename the columns of SHOW PARTITION/COLUMNS commands#14199
dongjoon-hyun wants to merge 1 commit into
apache:masterfrom
dongjoon-hyun:SPARK-16543

Conversation

@dongjoon-hyun

@dongjoon-hyundongjoon-hyun commented Jul 14, 2016

Copy link
Copy Markdown
Member

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

CommandSpark(Before)Spark(After)Hive
SHOW PARTITIONSresultpartitionpartition
SHOW COLUMNSresultcol_namefield

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

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
Copy Markdown
Contributor

LGTM - merging to master. Thanks.

@dongjoon-hyun

Copy link
Copy Markdown
MemberAuthor

Thank you, @hvanhovell

@dongjoon-hyun
dongjoon-hyun deleted the SPARK-16543 branch July 20, 2016 07:45
Sign up for freeto 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

@dongjoon-hyun@SparkQA@hvanhovell