Skip to content

Commit 118c86c

Browse files
reshkebaobao0206
authored andcommitted
Rename incremental nonterminal to opt_incremental. (apache#1473)
for src/backend/parser/gram.y, it is more convenient to name non-terminals (rules) using opt prefix if they allow empty input. There is no behavioral change. Found by review of cbdb - postgres16 rebase
1 parent cb3b691 commit 118c86c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/backend/parser/gram.y

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ static void check_expressions_in_partition_key(PartitionSpec *spec, core_yyscan_
524524

525525
%type <range> OptTempTableName
526526
%type <into> into_clause create_as_target create_mv_target
527-
%type <boolean> incremental
527+
%type <boolean> opt_incremental
528528

529529
%type <defelt> createfunc_opt_item common_func_opt_item dostmt_opt_item
530530
%type <fun_param> func_arg func_arg_with_default table_func_column aggr_arg
@@ -7579,7 +7579,7 @@ ext_opt_encoding_item:
75797579
*****************************************************************************/
75807580

75817581
CreateMatViewStmt:
7582-
CREATE OptNoLog incremental MATERIALIZED VIEW create_mv_target AS SelectStmt opt_with_data OptDistributedBy
7582+
CREATE OptNoLog opt_incremental MATERIALIZED VIEW create_mv_target AS SelectStmt opt_with_data OptDistributedBy
75837583
{
75847584
CreateTableAsStmt *ctas = makeNode(CreateTableAsStmt);
75857585
ctas->query = $8;
@@ -7594,7 +7594,7 @@ CreateMatViewStmt:
75947594
ctas->into->distributedBy = $10;
75957595
$$ = (Node *) ctas;
75967596
}
7597-
| CREATE OptNoLog incremental MATERIALIZED VIEW IF_P NOT EXISTS create_mv_target AS SelectStmt opt_with_data OptDistributedBy
7597+
| CREATE OptNoLog opt_incremental MATERIALIZED VIEW IF_P NOT EXISTS create_mv_target AS SelectStmt opt_with_data OptDistributedBy
75987598
{
75997599
CreateTableAsStmt *ctas = makeNode(CreateTableAsStmt);
76007600
ctas->query = $11;
@@ -7701,7 +7701,7 @@ create_mv_target:
77017701
}
77027702
;
77037703

7704-
incremental: INCREMENTAL { $$ = true; }
7704+
opt_incremental: INCREMENTAL { $$ = true; }
77057705
| /*EMPTY*/ { $$ = false; }
77067706
;
77077707

0 commit comments

Comments
 (0)