You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by re...@apache.org on 2025/12/06 08:40:42 UTC

(cloudberry) branch main updated: Rename `incremental` nonterminal to `opt_incremental`. (#1473)

This is an automated email from the ASF dual-hosted git repository.

reshke pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git


The following commit(s) were added to refs/heads/main by this push:
     new edfeb5745bd Rename `incremental` nonterminal to `opt_incremental`. (#1473)
edfeb5745bd is described below

commit edfeb5745bd1dc93bc7ab58d816d20f271fa5be1
Author: reshke <re...@double.cloud>
AuthorDate: Sat Dec 6 13:40:38 2025 +0500

    Rename `incremental` nonterminal to `opt_incremental`. (#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
---
 src/backend/parser/gram.y | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index db7661ea206..b982ba3a29a 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -500,7 +500,7 @@ static void check_expressions_in_partition_key(PartitionSpec *spec, core_yyscan_
 
 %type <range>	OptTempTableName
 %type <into>	into_clause create_as_target create_mv_target
-%type <boolean>	incremental
+%type <boolean>	opt_incremental
 
 %type <defelt>	createfunc_opt_item common_func_opt_item dostmt_opt_item
 %type <fun_param> func_arg func_arg_with_default table_func_column aggr_arg
@@ -7216,7 +7216,7 @@ ext_opt_encoding_item:
  *****************************************************************************/
 
 CreateMatViewStmt:
-		CREATE OptNoLog incremental MATERIALIZED VIEW create_mv_target AS SelectStmt opt_with_data OptDistributedBy
+		CREATE OptNoLog opt_incremental MATERIALIZED VIEW create_mv_target AS SelectStmt opt_with_data OptDistributedBy
 				{
 					CreateTableAsStmt *ctas = makeNode(CreateTableAsStmt);
 					ctas->query = $8;
@@ -7231,7 +7231,7 @@ CreateMatViewStmt:
 					ctas->into->distributedBy = $10;
 					$$ = (Node *) ctas;
 				}
-		| CREATE OptNoLog incremental MATERIALIZED VIEW IF_P NOT EXISTS create_mv_target AS SelectStmt opt_with_data OptDistributedBy
+		| CREATE OptNoLog opt_incremental MATERIALIZED VIEW IF_P NOT EXISTS create_mv_target AS SelectStmt opt_with_data OptDistributedBy
 				{
 					CreateTableAsStmt *ctas = makeNode(CreateTableAsStmt);
 					ctas->query = $11;
@@ -7336,7 +7336,7 @@ create_mv_target:
 				}
 		;
 
-incremental:	INCREMENTAL					{ $$ = true; }
+opt_incremental:	INCREMENTAL					{ $$ = true; }
 			| /*EMPTY*/						{ $$ = false; }
 		;
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org