Skip to content

fix(datafusion): enforce NOT NULL in copy-on-write UPDATE. - #1562

Merged
JingsongLi merged 1 commit into
apache:mainfrom
slfan1989:paimon-rust-1561
Nov 30, 2026
Merged

JingsongLi merged 1 commit into
apache:mainfrom
slfan1989:paimon-rust-1561

Conversation

@slfan1989

Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #1561

Fix a copy-on-write UPDATE bug that allowed NULL to be written into columns declared NOT NULL.

Brief change log

Cast the assigned values to their target column types, then validate them against the table's write schema before rewriting any data files.

Tests

Added a regression test covering explicit NULL, expressions that produce NULL, and casts that produce NULL. It verifies that a rejected update leaves all rows unchanged and that valid updates and zero-row matches still work.

API and Format

No.

Documentation

No.

@JingsongLi
JingsongLi merged commit bda4483 into apache:main Nov 30, 2026
15 checks passed
@slfan1989

Copy link
Copy Markdown
Contributor Author

Thanks for reviewing and merging this fix, @JingsongLi!

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] DataFusion copy-on-write UPDATE can write NULL into NOT NULL columns

2 participants