Hi Ramin, Thank you very much for driving this topic.
I assume the main motivation is to position MT as a replacement for regular tables + producer statements. That means conversion is a one-way operation, and we don't want a generic catalog object-to-catalog object conversion framework. Instead, this is a very special case where one-time conversions happen; therefore, special syntax would be overkill. The opt-in config would allow users and system builders to restrict the conversion (including temporally). I guess we could discuss if this config can also be set by SQL but that might be overkill. So +1 from me, Arvid On Wed, May 13, 2026 at 12:58 PM Ramin Gharib <[email protected]> wrote: > 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://urldefense.com/v3/__https://cwiki.apache.org/confluence/display/FLINK/FLIP-578*3A*In-place*Table*to*Materialized*Table*conversion__;JSsrKysrKw!!Ayb5sqE7!okBJoaLkkG9CS-7XJ5l20-eJBddTSHhZHynnZ7xdXeAhOZrvdFXf09dnUUyaJIYySkEuoby00NK9xierjHTyPQ$ > [2] > > https://urldefense.com/v3/__https://cwiki.apache.org/confluence/display/FLINK/FLIP-546*3A*Introduce*CREATE*OR*ALTER*for*Materialized*Tables__;JSsrKysrKys!!Ayb5sqE7!okBJoaLkkG9CS-7XJ5l20-eJBddTSHhZHynnZ7xdXeAhOZrvdFXf09dnUUyaJIYySkEuoby00NK9xicxCTyQDA$ >
