You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by "yjhnupt (via GitHub)" <gi...@apache.org> on 2024/12/03 11:14:51 UTC
Re: [PR] [Feature] Dynamic Table. [cloudberry]
yjhnupt commented on code in PR #725:
URL: https://github.com/apache/cloudberry/pull/725#discussion_r1867529647
##########
src/backend/parser/gram.y:
##########
@@ -7139,6 +7139,74 @@ CreateMatViewStmt:
ctas->into->distributedBy = $13;
$$ = (Node *) ctas;
}
+/*****************************************************************************
+ *
+ * QUERY :
+ * CREATE DYNAMIC TABLE relname AS SelectStmt
+ *
+ *****************************************************************************/
+ | CREATE OptNoLog DYNAMIC TABLE create_mv_target SCHEDULE task_schedule AS SelectStmt opt_with_data OptDistributedBy
+ {
+ CreateTableAsStmt *ctas = makeNode(CreateTableAsStmt);
+ ctas->query = $9;
+ ctas->into = $5;
+ ctas->objtype = OBJECT_MATVIEW;
+ ctas->is_select_into = false;
+ ctas->if_not_exists = false;
+ /* cram additional flags into the IntoClause */
+ $5->rel->relpersistence = $2;
+ $5->skipData = !($10);
+ $5->dynamicTbl = true;
+ $5->schedule = $7;
+ ctas->into->distributedBy = $11;
+ $$ = (Node *) ctas;
+ }
+ | CREATE OptNoLog DYNAMIC TABLE create_mv_target AS SelectStmt opt_with_data OptDistributedBy
Review Comment:
without SCHEDULE is allowed ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org