You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Sergey Nuyanzin (Jira)" <ji...@apache.org> on 2026/03/20 14:14:00 UTC
[jira] [Resolved] (FLINK-39276) CREATE OR ALTER MATERIALIZED TABLE should respect nullability defined in schema
[ https://issues.apache.org/jira/browse/FLINK-39276?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Nuyanzin resolved FLINK-39276.
-------------------------------------
Fix Version/s: 2.3.0
Resolution: Fixed
> CREATE OR ALTER MATERIALIZED TABLE should respect nullability defined in schema
> -------------------------------------------------------------------------------
>
> Key: FLINK-39276
> URL: https://issues.apache.org/jira/browse/FLINK-39276
> Project: Flink
> Issue Type: Sub-task
> Components: Table SQL / Planner
> Reporter: Sergey Nuyanzin
> Assignee: Sergey Nuyanzin
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.3.0
>
>
> The problem is that
> if there is existing materialized table {{mt}} with schema
> {noformat}
> `a` BIGINT NOT NULL, `b` STRING, `c` INT, `d` STRING
> {noformat}
> and then we use {{CREATE OR ALTER}} like
> {code:sql}
> CREATE OR ALTER MATERIALIZED TABLE mt (
> `a` BIGINT NOT NULL, `b` STRING, `c` INT, `d` STRING, `a1` BIGINT NOT NULL)
> AS SELECT a, b, c, d, a as `a1` FROM t3
> {code}
> then it will update existing schema adding {{`a1` BIGINT}}, i.e. it omits nullability.
> It would make sense if there is no explicit schema mentioned
> however in case of schema is present it should respect it
--
This message was sent by Atlassian Jira
(v8.20.10#820010)