[
https://issues.apache.org/jira/browse/FLINK-39358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sergey Nuyanzin updated FLINK-39358:
------------------------------------
Summary: Constraint and watermark should stay while CoA MT if there is no
explicit change with schema or constraint definition (was: Constraint and
watermark should stay while CoA MT if there is no explicit change with schema
or contraint definition)
> Constraint and watermark should stay while CoA MT if there is no explicit
> change with schema or constraint definition
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: FLINK-39358
> URL: https://issues.apache.org/jira/browse/FLINK-39358
> Project: Flink
> Issue Type: Sub-task
> Components: Table SQL / Planner
> Reporter: Sergey Nuyanzin
> Assignee: Sergey Nuyanzin
> Priority: Major
> Labels: pull-request-available
>
> The idea is that if existing table has a constraint or watermark
> and then there is CoA DDL without schema or constraint definition then the
> existing constraint/watermark should stay.
>
> If there are explicit schema/constraint, then they should be applied
> like
> {code:sql}
> CREATE MATERIALIZED TABLE mt (
> CONSTRAINT ct1 PRIMARY KEY(a) NOT ENFORCED
> )
> COMMENT 'materialized table comment'
> PARTITIONED BY (a, d)
> WITH (
> 'connector' = 'filesystem',
> 'format' = 'json'
> )
> FRESHNESS = INTERVAL '30' SECOND
> REFRESH_MODE = FULL
> AS SELECT * FROM t1
> {code}
> and then
> this query should drop the constraint
> {code:sql}
> CREATE OR ALTER MATERIALIZED TABLE mt (a BIGINT NOT NULL, b STRING, c INT, d
> STRING)
> AS SELECT * FROM t1;
> {code}
> and this should not
> {code:sql}
> CREATE OR ALTER MATERIALIZED TABLE mt
> AS SELECT * FROM t1;
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)