The GitHub Actions job "Flink CI (beta)" on flink.git/master has failed.
Run started by GitHub user AHeise (triggered by AHeise).

Head commit for run:
d70e596602b6211a415be40edab9a0f7bc7328dd / Ramin Gharib <[email protected]>
[FLINK-39847][table] Support in-place conversion of a table to a materialized 
table (#28287)

* [FLINK-39848][table] Add config option and Catalog API for table to 
materialized table conversion

Introduce the building blocks for in-place conversion of a regular table to a 
materialized table. Neither part is wired into SQL execution on its own.

Add the cluster-level table.materialized-table.conversion-from-table.enabled 
option (default false) that gates the conversion. It is read from the root 
configuration, so a session-level SET has no effect.

Add Catalog#convertTableToMaterializedTable, which swaps an existing regular 
table's catalog entry for a materialized table in place while preserving its 
identity and storage. The default throws UnsupportedOperationException; 
GenericInMemoryCatalog overrides it with a table-kind check. CatalogManager 
resolves both tables, delegates to the catalog, and fires an AlterTableEvent. 
Launching the refresh job is left to the executor, not the catalog.

* [FLINK-39849][table] Convert regular table to materialized table via CREATE 
OR ALTER

handleCreateOrAlter now dispatches on the kind of the existing object: a 
materialized table is altered as before, a view is rejected, and a regular 
table is converted in place to a materialized table when 
table.materialized-table.conversion-from-table.enabled is set on the cluster 
(otherwise the statement is rejected as before). The conversion carries over 
the source table's watermark and primary key when the DDL defines them, 
rejecting a source with more than one watermark. It emits the structured 
TableChanges (columns, constraint, watermark, definition query, options, 
distribution, start mode) by reusing the shared change-building helpers, and 
returns a ConvertTableToMaterializedTableOperation.

* [FLINK-39850][table] Launch refresh job when converting a table to a 
materialized table

The SQL gateway's MaterializedTableManager now handles 
ConvertTableToMaterializedTableOperation: it swaps the catalog entry and then 
launches the refresh job (a continuous streaming job or a full-mode workflow) 
and persists the refresh handler, mirroring CREATE MATERIALIZED TABLE. Without 
this the gateway rejected the operation as unsupported, so conversion swapped 
the catalog entry but never started refreshing.

On a refresh-job-launch failure the conversion makes a best-effort rollback: it 
drops the materialized table and recreates the original regular table from the 
operation's original table. Unlike CREATE there is no clean reverse path (the 
catalog only converts table to materialized table, and alterTable rejects kind 
changes), so this restores the user's prior state rather than dropping the 
table outright.

TestFileSystemCatalog gains the conversion override and the materialized table 
ITCase base enables the cluster-level conversion flag so the path can be 
exercised end to end.

* [FLINK-39851][docs] Document in-place table to materialized table conversion

Report URL: https://github.com/apache/flink/actions/runs/27573196621

With regards,
GitHub Actions via GitBox

Reply via email to