You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ge...@apache.org on 2022/01/10 11:43:31 UTC
[spark] branch branch-3.2 updated: [SPARK-37818][DOCS] Add option in the description document for show create table
This is an automated email from the ASF dual-hosted git repository.
gengliang pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new 385b34d [SPARK-37818][DOCS] Add option in the description document for show create table
385b34d is described below
commit 385b34d47a29d348378574fb2bd674f942da71f4
Author: PengLei <pe...@gmail.com>
AuthorDate: Mon Jan 10 19:40:02 2022 +0800
[SPARK-37818][DOCS] Add option in the description document for show create table
### What changes were proposed in this pull request?
Add options in the description document for `SHOW CREATE TABLE ` command.
<img width="767" alt="1" src="https://user-images.githubusercontent.com/41178002/148747443-ecd6586f-e4c4-4ae4-8ea5-969896b7d416.png">
<img width="758" alt="2" src="https://user-images.githubusercontent.com/41178002/148747457-873bc0c3-08fa-4d31-89e7-b44440372462.png">
### Why are the changes needed?
[#discussion](https://github.com/apache/spark/pull/34719#discussion_r758189709)
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
SKIP_API=1 SKIP_RDOC=1 SKIP_PYTHONDOC=1 SKIP_SCALADOC=1 bundle exec jekyll build
Closes #35107 from Peng-Lei/SPARK-37818.
Authored-by: PengLei <pe...@gmail.com>
Signed-off-by: Gengliang Wang <ge...@apache.org>
(cherry picked from commit 2f70e4f84073ac75457263a2b3f3cb835ee63d49)
Signed-off-by: Gengliang Wang <ge...@apache.org>
---
docs/sql-ref-syntax-aux-show-create-table.md | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/docs/sql-ref-syntax-aux-show-create-table.md b/docs/sql-ref-syntax-aux-show-create-table.md
index ae8c10e..83013b0 100644
--- a/docs/sql-ref-syntax-aux-show-create-table.md
+++ b/docs/sql-ref-syntax-aux-show-create-table.md
@@ -26,7 +26,7 @@ license: |
### Syntax
```sql
-SHOW CREATE TABLE table_identifier
+SHOW CREATE TABLE table_identifier [ AS SERDE ]
```
### Parameters
@@ -37,6 +37,10 @@ SHOW CREATE TABLE table_identifier
**Syntax:** `[ database_name. ] table_name`
+* **AS SERDE**
+
+ Generates Hive DDL for a Hive SerDe table.
+
### Examples
```sql
@@ -55,6 +59,25 @@ SHOW CREATE TABLE test;
'prop1' = 'value1',
'prop2' = 'value2')
+----------------------------------------------------+
+
+SHOW CREATE TABLE test AS SERDE;
++------------------------------------------------------------------------------+
+| createtab_stmt|
++------------------------------------------------------------------------------+
+|CREATE TABLE `default`.`test`(
+ `c` INT)
+ ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
+ WITH SERDEPROPERTIES (
+ 'serialization.format' = ',',
+ 'field.delim' = ',')
+ STORED AS
+ INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat'
+ OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
+ TBLPROPERTIES (
+ 'prop1' = 'value1',
+ 'prop2' = 'value2',
+ 'transient_lastDdlTime' = '1641800515')
++------------------------------------------------------------------------------+
```
### Related Statements
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org