Hi everyone,

I'd like to start a discussion on FLIP-578: In-place Table to Materialized
Table conversion. [1]
Flink's catalog DDL has no way to change a table's kind. Converting a
regular CREATE TABLE to a materialized table today requires creating a new
MT under a different name, repointing downstream consumers, and dropping
the old one — breaking references, doubling storage during cutover, and
offering no atomic rename.

The FLIP proposes to allow CREATE OR ALTER MATERIALIZED TABLE
<existing_table> AS <query> against an existing regular table, converting
it in place. Identity and storage are preserved, and the conversion
surfaces as a distinct Operation subtype.

Highlights:
1. Gated by a new opt-in config option,
table.materialized-table.conversion-from-table.enabled (default false).
Existing workflows are unchanged.
2. A new Catalog method convertTableToMaterializedTable(...) is added with
a default that throws UnsupportedOperationException, so existing catalogs
remain source- and binary-compatible.
3. Validation reuses the existing ALTER MATERIALIZED TABLE machinery
(schema reconciliation, options merge, freshness / refresh-mode). The
CREATE OR ALTER keyword (FLIP-546 [2]) is idempotent and inherits FLIP-492
query evolution for free.

Looking forward to your feedback.

Best,
Ramin Gharib [1]
https://cwiki.apache.org/confluence/display/FLINK/FLIP-578%3A+In-place+Table+to+Materialized+Table+conversion
[2]
https://cwiki.apache.org/confluence/display/FLINK/FLIP-546%3A+Introduce+CREATE+OR+ALTER+for+Materialized+Tables

Reply via email to