[
https://issues.apache.org/jira/browse/FLINK-41214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Timo Theusner updated FLINK-41214:
----------------------------------
Fix Version/s: 2.5.0
(was: 2.4.0)
> Declare a materialized table with Table#materializeInto
> -------------------------------------------------------
>
> Key: FLINK-41214
> URL: https://issues.apache.org/jira/browse/FLINK-41214
> Project: Flink
> Issue Type: Sub-task
> Components: Table SQL / API, Table SQL / Planner
> Reporter: Timo Theusner
> Assignee: Timo Theusner
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.5.0
>
>
> Add {{materializeInto(path)}} and {{{}materializeInto(path, freshness){}}},
> returning a {{MaterializedPipeline}} whose {{execute()}} applies {{CREATE OR
> ALTER MATERIALIZED TABLE}} semantics and returns a {{MaterializedTable}}
> handle.
> Proposed Changes
> * Move the create/alter/convert decision, schema merging and {{TableChange}}
> derivation from {{SqlCreateOrAlterMaterializedTableConverter}} into
> {{flink-table-api-java}}
> * Add {{{}Table#materializeInto(String){}}},
> {{{}Table#materializeInto(String, Duration){}}}, {{@PublicEvolving}}
> {{MaterializedPipeline}} with {{getIdentifier()}} and {{{}execute(){}}}, and
> {{@PublicEvolving}} {{MaterializedTable}} with {{getIdentifier()}} as the
> handle {{execute()}} returns
> * Build the create or full-alter operation in {{MaterializedPipelineImpl}}
> * Serialize the query with {{QueryOperation#asSerializableString}} when
> {{materializeInto}} is called. A query without a SQL form fails there, before
> any catalog write, with a {{ValidationException}} that says the query must be
> expressible in SQL and includes the cause. This covers inline function
> instances (with the default {{SqlFactory}}), {{from(TableDescriptor)}},
> {{fromDataStream}}/{{fromChangelogStream}} and operations without SQL
> serialization, e.g. session group windows
> * Accept temporary functions, models, tables and views, as SQL {{CREATE
> MATERIALIZED TABLE}} and {{TableEnvironment#createView(path, Table)}} do. The
> stored query refers to them by name, so a refresh job planned in another
> session, e.g. on a resume through the SQL Gateway, can't resolve them
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)