Skip to content

[flink] Add regression test and docs for nested NOT NULL constraints - #4198

Open
leekeiabstraction wants to merge 2 commits into
apache:mainfrom
leekeiabstraction:nested-not-null-regression-test
Open

[flink] Add regression test and docs for nested NOT NULL constraints#4198
leekeiabstraction wants to merge 2 commits into
apache:mainfrom
leekeiabstraction:nested-not-null-regression-test

Conversation

@leekeiabstraction

@leekeiabstraction leekeiabstraction commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Linked issue: close #4062

Flink before 2.2 drops nested NOT NULL constraints during DDL resolution (FLINK-20539), before the Fluss catalog receives the schema, so nothing can be recovered on the Fluss side for older versions. This adds testCreateTableWithNestedNotNull to the Flink 2.2/2.3 catalog ITCases to guard the Fluss round trip and documents the limitation in the Flink DDL page, including the NOT NULL workaround for ROW, ARRAY and MAP on older versions.

Fluss does not enforce nested NOT NULL on write and Flink's table.exec.sink.nested-constraint-enforcer defaults to IGNORE, so a null in a nested NOT NULL field is written and fails every subsequent read of that record. The docs recommend ROWS_AND_COLLECTIONS; write-time validation in Fluss is left for a follow-up.

@leekeiabstraction
leekeiabstraction force-pushed the nested-not-null-regression-test branch from 355dbd0 to 4255113 Compare September 2, 2026 07:15
Flink before 2.2 drops nested NOT NULL constraints during DDL resolution (FLINK-20539), so this adds a Flink 2.2/2.3 catalog ITCase for the Fluss round trip and documents the limitation for older Flink versions.
@leekeiabstraction
leekeiabstraction force-pushed the nested-not-null-regression-test branch from 4255113 to eb9b056 Compare September 2, 2026 07:18
@leekeiabstraction

Copy link
Copy Markdown
Contributor Author

@gyang94 Appreciate a review here

@gyang94

gyang94 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@leekeiabstraction cool, It is a bug in Flink side. It is enough for us to aware of it.
LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Flink Catalog loses nested NOT NULL constraints in complex types

2 participants