Skip to content

Commit 385b34d

Browse files
Peng-Leigengliangwang
authored andcommitted
[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](apache#34719 (comment)) ### 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 apache#35107 from Peng-Lei/SPARK-37818. Authored-by: PengLei <[email protected]> Signed-off-by: Gengliang Wang <[email protected]> (cherry picked from commit 2f70e4f) Signed-off-by: Gengliang Wang <[email protected]>
1 parent ae309f0 commit 385b34d

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

docs/sql-ref-syntax-aux-show-create-table.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ license: |
2626
### Syntax
2727

2828
```sql
29-
SHOW CREATE TABLE table_identifier
29+
SHOW CREATE TABLE table_identifier [ AS SERDE ]
3030
```
3131

3232
### Parameters
@@ -37,6 +37,10 @@ SHOW CREATE TABLE table_identifier
3737

3838
**Syntax:** `[ database_name. ] table_name`
3939

40+
* **AS SERDE**
41+
42+
Generates Hive DDL for a Hive SerDe table.
43+
4044
### Examples
4145

4246
```sql
@@ -55,6 +59,25 @@ SHOW CREATE TABLE test;
5559
'prop1' = 'value1',
5660
'prop2' = 'value2')
5761
+----------------------------------------------------+
62+
63+
SHOW CREATE TABLE test AS SERDE;
64+
+------------------------------------------------------------------------------+
65+
| createtab_stmt|
66+
+------------------------------------------------------------------------------+
67+
|CREATE TABLE `default`.`test`(
68+
`c` INT)
69+
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
70+
WITH SERDEPROPERTIES (
71+
'serialization.format' = ',',
72+
'field.delim' = ',')
73+
STORED AS
74+
INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat'
75+
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
76+
TBLPROPERTIES (
77+
'prop1' = 'value1',
78+
'prop2' = 'value2',
79+
'transient_lastDdlTime' = '1641800515')
80+
+------------------------------------------------------------------------------+
5881
```
5982

6083
### Related Statements

0 commit comments

Comments
 (0)