File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -4145,6 +4145,8 @@ impl<'a> Parser<'a> {
4145
4145
None
4146
4146
} ;
4147
4147
4148
+ let table_options = self . parse_options ( Keyword :: OPTIONS ) ?;
4149
+
4148
4150
// Parse optional `AS ( query )`
4149
4151
let query = if self . parse_keyword ( Keyword :: AS ) {
4150
4152
Some ( Box :: new ( self . parse_query ( ) ?) )
@@ -4192,8 +4194,7 @@ impl<'a> Parser<'a> {
4192
4194
} ;
4193
4195
4194
4196
let strict = self . parse_keyword ( Keyword :: STRICT ) ;
4195
-
4196
- let table_options = self . parse_options ( Keyword :: OPTIONS ) ?;
4197
+
4197
4198
//Databricks has TBLPROPERTIES after COMMENT
4198
4199
let _table_properties = self . parse_options ( Keyword :: TBLPROPERTIES ) ?;
4199
4200
table_properties. extend ( _table_properties) ;
Original file line number Diff line number Diff line change @@ -1385,3 +1385,10 @@ fn test_options_expression() {
1385
1385
"CREATE TABLE `myproject`.`mydataset`.`mytable` (id INT64) OPTIONS (max_staleness = INTERVAL '0-0 0 0:15:0' YEAR TO SECOND)" ,
1386
1386
) ;
1387
1387
}
1388
+
1389
+ #[ test]
1390
+ fn test_create_table_options_expression ( ) {
1391
+ bigquery ( ) . verified_stmt (
1392
+ "CREATE OR REPLACE TABLE `myproject`.`mydataset`.`mytable` OPTIONS (description = \" \" \" Project entity stream base\" \" \" ) AS (SELECT * FROM `myproject`.`mydataset`.`othertable`)" ,
1393
+ ) ;
1394
+ }
You can’t perform that action at this time.
0 commit comments