-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parser: Adds new grammar to support user specified PK in CTAS query.
This change adds grammar rules to support users specifying the primary key columns in a CREATE TABLE...AS query. It is a subset of the grammar which is used by a normal CREATE TABLE query, without having to specify the types for each of the columns in the new table. Release note: sql change
- Loading branch information
1 parent
5d37afc
commit 04e5a37
Showing
3 changed files
with
95 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
create_table_as_stmt ::= | ||
'CREATE' 'TABLE' table_name '(' name ( ( ',' name ) )* ')' 'AS' select_stmt | ||
| 'CREATE' 'TABLE' table_name 'AS' select_stmt | ||
| 'CREATE' 'TABLE' 'IF' 'NOT' 'EXISTS' table_name '(' name ( ( ',' name ) )* ')' 'AS' select_stmt | ||
| 'CREATE' 'TABLE' 'IF' 'NOT' 'EXISTS' table_name 'AS' select_stmt | ||
'CREATE' 'TABLE' table_name ctas_opt_col_list 'AS' select_stmt | ||
| 'CREATE' 'TABLE' 'IF' 'NOT' 'EXISTS' table_name ctas_opt_col_list 'AS' select_stmt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters