-
- Downloads
[SPARK-21891][SQL] Add TBLPROPERTIES to DDL statement: CREATE TABLE USING
## What changes were proposed in this pull request? Add `TBLPROPERTIES` to the DDL statement `CREATE TABLE USING`. After this change, the DDL becomes ``` CREATE [TEMPORARY] TABLE [IF NOT EXISTS] [db_name.]table_name USING table_provider [OPTIONS table_property_list] [PARTITIONED BY (col_name, col_name, ...)] [CLUSTERED BY (col_name, col_name, ...) [SORTED BY (col_name [ASC|DESC], ...)] INTO num_buckets BUCKETS ] [LOCATION path] [COMMENT table_comment] [TBLPROPERTIES (property_name=property_value, ...)] [[AS] select_statement]; ``` ## How was this patch tested? Add a few tests Author: gatorsmile <gatorsmile@gmail.com> Closes #19100 from gatorsmile/addTablePropsToCreateTableUsing.
Showing
- sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 1 addition, 0 deletions...in/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
- sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala 5 additions, 2 deletions...scala/org/apache/spark/sql/execution/SparkSqlParser.scala
- sql/core/src/test/resources/sql-tests/inputs/describe.sql 2 additions, 1 deletionsql/core/src/test/resources/sql-tests/inputs/describe.sql
- sql/core/src/test/resources/sql-tests/results/cross-join.sql.out 1 addition, 0 deletions...e/src/test/resources/sql-tests/results/cross-join.sql.out
- sql/core/src/test/resources/sql-tests/results/describe.sql.out 5 additions, 2 deletions...ore/src/test/resources/sql-tests/results/describe.sql.out
- sql/core/src/test/scala/org/apache/spark/sql/execution/OptimizeMetadataOnlyQuerySuite.scala 8 additions, 0 deletions.../spark/sql/execution/OptimizeMetadataOnlyQuerySuite.scala
- sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLParserSuite.scala 20 additions, 0 deletions...g/apache/spark/sql/execution/command/DDLParserSuite.scala
Loading
Please register or sign in to comment