[
https://issues.apache.org/jira/browse/FLINK-41401?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Timo Theusner updated FLINK-41401:
----------------------------------
Description:
Add the schema methods, combined with other changes into one alter and one
refresh-job restart.
Proposed Changes
* Add {{addSchema(Schema)}}, {{modifySchema(Schema)}},
{{dropColumns(String...)}}, {{dropWatermark()}}, {{dropPrimaryKey()}} and
{{dropConstraint(String)}} to {{MaterializedTableEvolution}}
* Apply the schema edits in call order to the stored schema, and pass the
result as the declared schema to the {{CREATE OR ALTER}} derivation that
{{alter()}} uses since FLINK-41397. Query, schema and option changes are then
checked and applied once
* Store columns that the new query appends as nullable, also when the alter
has schema edits. Primary key columns stay NOT NULL. Without this, any schema
edit keeps the query's NOT NULL on appended columns: rows written before the
alter hold NULL in a NOT NULL column, and a later query change that can produce
NULL for the column is rejected
was:
Add the schema methods, combined with other changes into one alter and one
refresh-job restart.
Proposed Changes
* Add {{addSchema(Schema)}}, {{modifySchema(Schema)}},
{{dropColumns(String...)}}, {{dropWatermark()}}, {{dropPrimaryKey()}} and
{{dropConstraint(String)}} to {{MaterializedTableEvolution}}
* Apply the schema edits in call order to the stored schema, and pass the
result as the declared schema to the {{CREATE OR ALTER}} derivation that
{{alter()}} uses since FLINK-41397. Query, schema and option changes are then
checked and applied once
* Store columns that the new query appends as nullable, also when the alter
has schema edits. Primary key columns stay NOT NULL. Without this, any schema
edit keeps the query's NOT NULL on appended columns: rows written before the
alter hold NULL in a NOT NULL column, and a later query change that can produce
NULL for the column is rejected
* As in FLIP-616, {{addSchema}} rejects physical and persisted metadata
columns, which come from the defining query
> Evolve a materialized table's schema with alter()
> -------------------------------------------------
>
> Key: FLINK-41401
> URL: https://issues.apache.org/jira/browse/FLINK-41401
> Project: Flink
> Issue Type: Sub-task
> Components: Table SQL / API, Table SQL / Planner
> Reporter: Timo Theusner
> Priority: Major
>
> Add the schema methods, combined with other changes into one alter and one
> refresh-job restart.
> Proposed Changes
> * Add {{addSchema(Schema)}}, {{modifySchema(Schema)}},
> {{dropColumns(String...)}}, {{dropWatermark()}}, {{dropPrimaryKey()}} and
> {{dropConstraint(String)}} to {{MaterializedTableEvolution}}
> * Apply the schema edits in call order to the stored schema, and pass the
> result as the declared schema to the {{CREATE OR ALTER}} derivation that
> {{alter()}} uses since FLINK-41397. Query, schema and option changes are then
> checked and applied once
> * Store columns that the new query appends as nullable, also when the alter
> has schema edits. Primary key columns stay NOT NULL. Without this, any schema
> edit keeps the query's NOT NULL on appended columns: rows written before the
> alter hold NULL in a NOT NULL column, and a later query change that can
> produce NULL for the column is rejected
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)