[
https://issues.apache.org/jira/browse/FLINK-39661?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ramin Gharib updated FLINK-39661:
---------------------------------
Component/s: Table SQL / Planner
> Support all converters for standalone ALTER MATERIALIZED TABLE statements
> -------------------------------------------------------------------------
>
> Key: FLINK-39661
> URL: https://issues.apache.org/jira/browse/FLINK-39661
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / Planner
> Reporter: Ramin Gharib
> Priority: Major
>
> FLINK-35191 shipped the parser side for {{{}ALTER MATERIALIZED TABLE
> SUSPEND{}}}, {{{}RESUME{}}}, {{{}REFRESH{}}}, {{{}SET{}}}, and {{{}RESET{}}}.
> {{{}SUSPEND{}}}, {{{}RESUME{}}}, and {{REFRESH}} got planner converters in
> follow-up work. The {{SET}} and {{RESET}} branches, and the related {{SET
> FRESHNESS}} and {{SET REFRESH_MODE}} branches, never did.
> As a result the parser accepts the statements but
> {{org.apache.flink.table.planner.operations.converters.SqlNodeConverters}}
> has no converter registered for the resulting nodes.
> {{org.apache.flink.table.planner.delegation.ParserImpl#parse}} then throws
> {{TableException("Unsupported query: " + statement)}} from line 107.
> *Affected statements:*
> # {{ALTER MATERIALIZED TABLE t SET ('k' = 'v')}} →
> {{SqlAlterMaterializedTableOptions}}
> # {{ALTER MATERIALIZED TABLE t RESET ('k')}} →
> {{SqlAlterMaterializedTableReset}}
> # {{ALTER MATERIALIZED TABLE t SET FRESHNESS = INTERVAL '1' MINUTE}} →
> {{SqlAlterMaterializedTableFreshness}}
> # {{ALTER MATERIALIZED TABLE t SET REFRESH_MODE = FULL | CONTINUOUS}} →
> {{SqlAlterMaterializedTableRefreshMode}}
> This is distinct from the {{CREATE OR ALTER MATERIALIZED TABLE}} path tracked
> under FLINK-38355. That path uses a different AST node and already supports
> options changes via FLINK-39199. The standalone {{ALTER MATERIALIZED TABLE}}
> path tracked here is the form users invoke when they want to mutate a single
> attribute of an existing materialized table without restating the full DDL.
> *Related issues:*
> * Parent: FLINK-35187 (FLIP-435 umbrella).
> * Origin: FLINK-35191 "Support alter materialized table related syntaxes:
> suspend, resume, refresh, set and reset". Resolved, but only delivered the
> parser half for SET / RESET / FRESHNESS / REFRESH_MODE.
> *Scope:* four sub-tasks below. Each adds one converter, registers it in
> {{{}SqlNodeConverters#registerMaterializedTableConverters{}}}, and adds
> planner-test and IT coverage.
> *Out of scope:* any change to the parser grammar, AST nodes, or the {{CREATE
> OR ALTER}} path.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)