Ramin Gharib created FLINK-39717:
------------------------------------
Summary: Document SET/RESET key handling for ALTER TABLE, CATALOG,
MODEL and DATABASE
Key: FLINK-39717
URL: https://issues.apache.org/jira/browse/FLINK-39717
Project: Flink
Issue Type: Improvement
Components: Documentation, Table SQL / API
Reporter: Ramin Gharib
The reference docs at {{docs/content/docs/sql/reference/ddl/alter.md}} (and the
ZH mirror) describe {{{}ALTER TABLE{}}}, {{{}ALTER CATALOG{}}}, {{ALTER MODEL}}
and {{ALTER DATABASE}} {{{}SET{}}}/{{{}RESET{}}} only as "override the old
value with the new one". The actual converter behavior covers several edge
cases that are not documented and that differ across DDLs:
* *Duplicate keys* in the option list: last value wins for {{SET}} (a warning
is logged via {{{}SqlParseUtils.extractMap{}}}), de-duplicated for {{RESET}}
(via {{{}SqlParseUtils.extractSet{}}}).
* *Unknown keys* on {{{}RESET{}}}: silently ignored, statement still succeeds.
* *Empty list* {{SET ()}} / {{{}RESET (){}}}: accepted as a no-op for
{{{}ALTER TABLE SET{}}}, {{{}ALTER CATALOG SET{}}}, {{{}ALTER DATABASE SET{}}};
rejected for {{{}ALTER MODEL SET{}}}, and rejected for all {{RESET}} paths.
* *Reserved keys* on {{{}RESET{}}}: {{connector}} for {{{}ALTER TABLE{}}},
{{type}} for {{{}ALTER CATALOG{}}}; none for {{{}ALTER MODEL{}}}.
This is a docs-only change that brings the reference up to par with the per-DDL
converter behavior already documented for {{ALTER MATERIALIZED TABLE}} in
FLINK-39662 and FLINK-39663. No code changes.
*Scope:*
* {{docs/content/docs/sql/reference/ddl/alter.md}}
* {{docs/content.zh/docs/sql/reference/ddl/alter.md}}
One commit per DDL (TABLE, CATALOG, MODEL, DATABASE), branch already prepared
locally.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)