diff options
author | Cheng Lian <lian@databricks.com> | 2016-05-04 16:44:09 +0800 |
---|---|---|
committer | Cheng Lian <lian@databricks.com> | 2016-05-04 16:44:09 +0800 |
commit | f152fae306dc75565cb4648ee1211416d7c0bb23 (patch) | |
tree | f5e7075d75968f037e8f670e1488bbb10a2c1c33 /examples/src/main/python | |
parent | 6c12e801e84565265d2939b920901d1805d5935f (diff) | |
download | spark-f152fae306dc75565cb4648ee1211416d7c0bb23.tar.gz spark-f152fae306dc75565cb4648ee1211416d7c0bb23.tar.bz2 spark-f152fae306dc75565cb4648ee1211416d7c0bb23.zip |
[SPARK-14127][SQL] Native "DESC [EXTENDED | FORMATTED] <table>" DDL command
## What changes were proposed in this pull request?
This PR implements native `DESC [EXTENDED | FORMATTED] <table>` DDL command. Sample output:
```
scala> spark.sql("desc extended src").show(100, truncate = false)
+----------------------------+---------------------------------+-------+
|col_name |data_type |comment|
+----------------------------+---------------------------------+-------+
|key |int | |
|value |string | |
| | | |
|# Detailed Table Information|CatalogTable(`default`.`src`, ...| |
+----------------------------+---------------------------------+-------+
scala> spark.sql("desc formatted src").show(100, truncate = false)
+----------------------------+----------------------------------------------------------+-------+
|col_name |data_type |comment|
+----------------------------+----------------------------------------------------------+-------+
|key |int | |
|value |string | |
| | | |
|# Detailed Table Information| | |
|Database: |default | |
|Owner: |lian | |
|Create Time: |Mon Jan 04 17:06:00 CST 2016 | |
|Last Access Time: |Thu Jan 01 08:00:00 CST 1970 | |
|Location: |hdfs://localhost:9000/user/hive/warehouse_hive121/src | |
|Table Type: |MANAGED | |
|Table Parameters: | | |
| transient_lastDdlTime |1451898360 | |
| | | |
|# Storage Information | | |
|SerDe Library: |org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe | |
|InputFormat: |org.apache.hadoop.mapred.TextInputFormat | |
|OutputFormat: |org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat| |
|Num Buckets: |-1 | |
|Bucket Columns: |[] | |
|Sort Columns: |[] | |
|Storage Desc Parameters: | | |
| serialization.format |1 | |
+----------------------------+----------------------------------------------------------+-------+
```
## How was this patch tested?
A test case is added to `HiveDDLSuite` to check command output.
Author: Cheng Lian <lian@databricks.com>
Closes #12844 from liancheng/spark-14127-desc-table.
Diffstat (limited to 'examples/src/main/python')
0 files changed, 0 insertions, 0 deletions