Skip to content

[flink] Keep NOT NULL of VARIANT columns created through Flink - #10617

Merged
JingsongLi merged 1 commit into
apache:masterfrom
LuciferYang:fix/flink-variant-not-null
Oct 18, 2026
Merged

JingsongLi merged 1 commit into
apache:masterfrom
LuciferYang:fix/flink-variant-not-null

Conversation

@LuciferYang

@LuciferYang LuciferYang commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

close #10616

LogicalTypeToDataType.visit(VariantType) always created a nullable Paimon VariantType, so a VARIANT NOT NULL column created through Flink was stored as nullable and NULLs could be written into it. It now keeps the nullability of the Flink type, like the other types in the converter.

Tests

CatalogTableITCase#testVariantNotNull (Flink 2.1 and above): inserting NULL into a VARIANT NOT NULL column fails on the NOT NULL constraint, nothing is written, and the stored column is not nullable. On master the insert succeeds.

API and Format

no

Documentation

no

@JingsongLi

Copy link
Copy Markdown
Contributor

+1

@JingsongLi
JingsongLi merged commit 0b715f6 into apache:master Oct 18, 2026
13 checks passed
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 VARIANT NOT NULL column is stored as nullable

2 participants