aboutsummaryrefslogtreecommitdiff
path: root/sql/catalyst/src/main/antlr4
diff options
context:
space:
mode:
authorAndrew Or <andrew@databricks.com>2016-04-13 11:08:34 -0700
committerYin Huai <yhuai@databricks.com>2016-04-13 11:08:34 -0700
commit7d2ed8cc030f3d84fea47fded072c320c3d87ca7 (patch)
treec85aedad5a7fb97ca4b02f1c8f81983f89b90f97 /sql/catalyst/src/main/antlr4
parent1018a1c1eb33eefbfb9025fac7a1cdafc5cbf8f8 (diff)
downloadspark-7d2ed8cc030f3d84fea47fded072c320c3d87ca7.tar.gz
spark-7d2ed8cc030f3d84fea47fded072c320c3d87ca7.tar.bz2
spark-7d2ed8cc030f3d84fea47fded072c320c3d87ca7.zip
[SPARK-14388][SQL] Implement CREATE TABLE
## What changes were proposed in this pull request? This patch implements the `CREATE TABLE` command using the `SessionCatalog`. Previously we handled only `CTAS` and `CREATE TABLE ... USING`. This requires us to refactor `CatalogTable` to accept various fields (e.g. bucket and skew columns) and pass them to Hive. WIP: Note that I haven't verified whether this actually works yet! But I believe it does. ## How was this patch tested? Tests will come in a future commit. Author: Andrew Or <andrew@databricks.com> Author: Yin Huai <yhuai@databricks.com> Closes #12271 from andrewor14/create-table-ddl.
Diffstat (limited to 'sql/catalyst/src/main/antlr4')
-rw-r--r--sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g43
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 b/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
index 0e2cd39448..a937ad1eb7 100644
--- a/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
+++ b/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
@@ -272,8 +272,7 @@ createFileFormat
;
fileFormat
- : INPUTFORMAT inFmt=STRING OUTPUTFORMAT outFmt=STRING (SERDE serdeCls=STRING)?
- (INPUTDRIVER inDriver=STRING OUTPUTDRIVER outDriver=STRING)? #tableFileFormat
+ : INPUTFORMAT inFmt=STRING OUTPUTFORMAT outFmt=STRING (SERDE serdeCls=STRING)? #tableFileFormat
| identifier #genericFileFormat
;