[GitHub] spark pull request #20557: [SPARK-23364][SQL]'desc table' command in spark-s...

2018-05-12 Thread asfgit
Github user asfgit closed the pull request at:

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


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #20557: [SPARK-23364][SQL]'desc table' command in spark-s...

2018-02-11 Thread gatorsmile
Github user gatorsmile commented on a diff in the pull request:

https://github.com/apache/spark/pull/20557#discussion_r167456007
  
--- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala ---
@@ -539,15 +539,15 @@ case class DescribeTableCommand(
 throw new AnalysisException(
   s"DESC PARTITION is not allowed on a temporary view: 
${table.identifier}")
   }
-  describeSchema(catalog.lookupRelation(table).schema, result, header 
= false)
+  describeSchema(catalog.lookupRelation(table).schema, result, header 
= true)
--- End diff --

Yeah. Hive beeline already hardcoded the header. See the 
https://issues.apache.org/jira/browse/SPARK-20954


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #20557: [SPARK-23364][SQL]'desc table' command in spark-s...

2018-02-11 Thread srowen
Github user srowen commented on a diff in the pull request:

https://github.com/apache/spark/pull/20557#discussion_r167437780
  
--- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala ---
@@ -539,15 +539,15 @@ case class DescribeTableCommand(
 throw new AnalysisException(
   s"DESC PARTITION is not allowed on a temporary view: 
${table.identifier}")
   }
-  describeSchema(catalog.lookupRelation(table).schema, result, header 
= false)
+  describeSchema(catalog.lookupRelation(table).schema, result, header 
= true)
--- End diff --

@gatorsmile I wasn't clear -- you're saying this change is _wrong_ because 
it re-adds a header that was removed in the other PR? 


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #20557: [SPARK-23364][SQL]'desc table' command in spark-s...

2018-02-10 Thread guoxiaolongzte
Github user guoxiaolongzte commented on a diff in the pull request:

https://github.com/apache/spark/pull/20557#discussion_r167419765
  
--- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala ---
@@ -539,15 +539,15 @@ case class DescribeTableCommand(
 throw new AnalysisException(
   s"DESC PARTITION is not allowed on a temporary view: 
${table.identifier}")
   }
-  describeSchema(catalog.lookupRelation(table).schema, result, header 
= false)
+  describeSchema(catalog.lookupRelation(table).schema, result, header 
= true)
--- End diff --

The snapshot is correct fix code effect, the statistics rows does not 
contain the head

![2](https://user-images.githubusercontent.com/26266482/36069344-ba833c56-0f22-11e8-9ab6-26f0ae6285b7.png)


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #20557: [SPARK-23364][SQL]'desc table' command in spark-s...

2018-02-10 Thread guoxiaolongzte
Github user guoxiaolongzte commented on a diff in the pull request:

https://github.com/apache/spark/pull/20557#discussion_r167416457
  
--- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala ---
@@ -539,15 +539,15 @@ case class DescribeTableCommand(
 throw new AnalysisException(
   s"DESC PARTITION is not allowed on a temporary view: 
${table.identifier}")
   }
-  describeSchema(catalog.lookupRelation(table).schema, result, header 
= false)
+  describeSchema(catalog.lookupRelation(table).schema, result, header 
= true)
--- End diff --

# Partition Information
# col_name  data_type   comment

Partition information also takes up two rows.
I try to keep the head of the case, let rows number is displayed correctly.


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #20557: [SPARK-23364][SQL]'desc table' command in spark-s...

2018-02-09 Thread gatorsmile
Github user gatorsmile commented on a diff in the pull request:

https://github.com/apache/spark/pull/20557#discussion_r167330494
  
--- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala ---
@@ -539,15 +539,15 @@ case class DescribeTableCommand(
 throw new AnalysisException(
   s"DESC PARTITION is not allowed on a temporary view: 
${table.identifier}")
   }
-  describeSchema(catalog.lookupRelation(table).schema, result, header 
= false)
+  describeSchema(catalog.lookupRelation(table).schema, result, header 
= true)
--- End diff --

We did it on purpose. For details, see 
https://github.com/apache/spark/pull/18203


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #20557: [SPARK-23364][SQL]'desc table' command in spark-s...

2018-02-09 Thread srowen
Github user srowen commented on a diff in the pull request:

https://github.com/apache/spark/pull/20557#discussion_r167244246
  
--- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala ---
@@ -539,15 +539,15 @@ case class DescribeTableCommand(
 throw new AnalysisException(
   s"DESC PARTITION is not allowed on a temporary view: 
${table.identifier}")
   }
-  describeSchema(catalog.lookupRelation(table).schema, result, header 
= false)
+  describeSchema(catalog.lookupRelation(table).schema, result, header 
= true)
--- End diff --

It's not worth yet another flag, and this is a behavior change in the 
output. There's no motivation for this change either.


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #20557: [SPARK-23364][SQL]'desc table' command in spark-s...

2018-02-09 Thread wangyum
Github user wangyum commented on a diff in the pull request:

https://github.com/apache/spark/pull/20557#discussion_r167225201
  
--- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala ---
@@ -539,15 +539,15 @@ case class DescribeTableCommand(
 throw new AnalysisException(
   s"DESC PARTITION is not allowed on a temporary view: 
${table.identifier}")
   }
-  describeSchema(catalog.lookupRelation(table).schema, result, header 
= false)
+  describeSchema(catalog.lookupRelation(table).schema, result, header 
= true)
--- End diff --

May be should add a configure like `hive.cli.print.header`.


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #20557: [SPARK-23364][SQL]'desc table' command in spark-s...

2018-02-08 Thread guoxiaolongzte
GitHub user guoxiaolongzte opened a pull request:

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

[SPARK-23364][SQL]'desc table' command in spark-sql add column head display

## What changes were proposed in this pull request?

Use 'desc partition_table'  command in spark-sql client, i think it should 
add column head display.

Add 'col_name' ‘data_type’ 'comment'  column head display.

fix before:

![2](https://user-images.githubusercontent.com/26266482/36013945-283fea8c-0da2-11e8-8265-63d816dabd9b.png)

fix after:

![1](https://user-images.githubusercontent.com/26266482/36013954-3252fd7a-0da2-11e8-8e63-3b586f238072.png)

## How was this patch tested?

manual tests

Please review http://spark.apache.org/contributing.html before opening a 
pull request.

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

$ git pull https://github.com/guoxiaolongzte/spark SPARK-23364

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

https://github.com/apache/spark/pull/20557.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 #20557


commit 5699c0dc2810a4500f0ee34414b77b80afd0e9c1
Author: guoxiaolong 
Date:   2018-02-09T06:00:40Z

[SPARK-23364][SQL]'desc table' command in spark-sql add column head display




---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org