test: add more test cases to improve test coverage for the write functionality in Lance#5619
Merged
wjones127 merged 1 commit intolance-format:mainfrom Jan 14, 2026
Merged
Conversation
1304652 to
8335288
Compare
wjones127
requested changes
Jan 5, 2026
Contributor
wjones127
left a comment
There was a problem hiding this comment.
Also changed the type in the PR title to test.
8335288 to
0f0d455
Compare
wjones127
reviewed
Jan 6, 2026
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
0f0d455 to
c2cdc3c
Compare
Contributor
Author
|
@wjones127 please review this pr again |
wjones127
reviewed
Jan 12, 2026
Contributor
wjones127
left a comment
There was a problem hiding this comment.
Seems good. I have a few suggestions to make it shorter.
…ctionality in Lance
c2cdc3c to
63d711d
Compare
Contributor
Author
|
all checks has passed, please review it again. @wjones127 |
wjones127
approved these changes
Jan 14, 2026
jackye1995
pushed a commit
to jackye1995/lance
that referenced
this pull request
Jan 21, 2026
…tionality in Lance (lance-format#5619) This PR adds four new test cases to improve test coverage for the write functionality in Lance: ### Changes - **`test_max_rows_per_file`** - Tests the `max_rows_per_file` parameter behavior - Validates that data is correctly split into multiple fragments based on row count limits - Verifies row distribution: 12,000 rows with limit of 5,000 creates 3 fragments [5000, 5000, 2000] - **`test_max_rows_per_group`** - Tests `max_rows_per_group` parameter across different Lance file versions - **V1 (Legacy)**: Row group chunking affects fragment distribution - **V2 (Stable)**: Ignores row group size, splits only at file boundaries - Demonstrates the behavioral differences between V1 and V2 implementations - **test_empty_stream_write:** Verifies graceful handling of empty input streams to prevent unexpected panics or cryptic errors. - **test_schema_mismatch_on_append:** Ensures clear error messages and data integrity when attempting to append data with incompatible schemas. - **test_disk_full_error:** Validates proper error propagation for storage-related failures to help users quickly identify and debug disk space issues. - **test_write_interruption_recovery:** Tests the complete transaction flow for interrupted writes, ensuring dataset consistency, data integrity, and successful retry capability. ### Motivation These tests improve confidence in the write functionality by covering important parameters and features that were previously untested or under-tested. They help prevent regressions and ensure correct behavior across different Lance file versions.
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.
This PR adds four new test cases to improve test coverage for the write functionality in Lance:
Changes
test_max_rows_per_file- Tests themax_rows_per_fileparameter behaviortest_max_rows_per_group- Testsmax_rows_per_groupparameter across different Lance file versionstest_empty_stream_write: Verifies graceful handling of empty input streams to prevent unexpected panics or cryptic errors.
test_schema_mismatch_on_append: Ensures clear error messages and data integrity when attempting to append data with incompatible schemas.
test_disk_full_error: Validates proper error propagation for storage-related failures to help users quickly identify and debug disk space issues.
test_write_interruption_recovery: Tests the complete transaction flow for interrupted writes, ensuring dataset consistency, data integrity, and successful retry capability.
Motivation
These tests improve confidence in the write functionality by covering important parameters and features that were previously untested or under-tested. They help prevent regressions and ensure correct behavior across different Lance file versions.