fix: check data batch nullability match with schema in write process#122
Merged
Merged
Conversation
lxy-9602
reviewed
Feb 6, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds nullability validation to ensure data written to tables conforms to the schema's nullability constraints. The validation checks that fields marked as non-nullable in the schema do not contain null values in the data.
Changes:
- Implemented
CheckNullabilityMatchutility function with support for nested types (struct, list, map) - Added validation in the write process to verify data nullability matches schema constraints
- Enhanced API documentation to clarify nullability requirements
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/paimon/common/utils/arrow/arrow_utils.h | Added CheckNullabilityMatch method and supporting logic for validating nullability across nested data types |
| src/paimon/common/utils/arrow/arrow_utils_test.cpp | Added comprehensive test coverage for nullability validation across simple and complex nested types |
| src/paimon/core/operation/abstract_file_store_write.cpp | Integrated nullability check into the write process |
| test/inte/write_inte_test.cpp | Added integration test verifying nullability validation during write operations |
| test/inte/blob_table_inte_test.cpp | Removed obsolete blob-specific null value test |
| src/paimon/core/table/sink/commit_message_test.cpp | Simplified test schema and data generation to align with actual field types |
| include/paimon/record_batch.h | Enhanced documentation to clarify nullability requirements for RecordBatchBuilder |
| include/paimon/file_store_write.h | Enhanced documentation to clarify nullability requirements for Write method |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
lucasfang
reviewed
Feb 6, 2026
lucasfang
reviewed
Feb 6, 2026
zjw1111
reviewed
Feb 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Linked issue: close #121
Verify whether the nullability of the data is consistent with that defined in the table schema during data writing.
Tests
WriteInteTest