feat: support fragment level update columns operation in Python#5001
Merged
jackye1995 merged 3 commits intolance-format:mainfrom Oct 28, 2025
Merged
Conversation
24ebe1f to
4349db8
Compare
xloya
commented
Oct 20, 2025
| fields_modified: List[int] | ||
| fields_for_preserving_frag_bitmap: List[int] | ||
| update_mode: str | ||
| removed_fragment_ids: List[int] = dataclasses.field(default_factory=list) |
Contributor
Author
There was a problem hiding this comment.
It's necessary to assign initial values to the attributes in the Update Operation. Otherwise, when using the following commit code:
op = LanceOperation.Update(
updated_fragments=[updated_fragment],
fields_modified=fields_modified,
)
updated_dataset = lance.LanceDataset.commit(
str(dataset_uri), op, read_version=dataset.version
)
It will encounter the following exception:
TypeError: LanceOperation.Update.__init__() missing 4 required positional arguments: 'removed_fragment_ids', 'new_fragments', 'fields_for_preserving_frag_bitmap', and 'update_mode'
46e21fb to
577437a
Compare
xloya
commented
Oct 20, 2025
577437a to
721a8c0
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5001 +/- ##
==========================================
+ Coverage 81.71% 81.75% +0.03%
==========================================
Files 340 340
Lines 137236 137555 +319
Branches 137236 137555 +319
==========================================
+ Hits 112144 112454 +310
+ Misses 21371 21369 -2
- Partials 3721 3732 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c1f7317 to
4fb5fbc
Compare
Contributor
Author
|
@wayneli-vt @jackye1995 @westonpace @wjones127 PTAL, thx! |
Contributor
|
@xloya Looks good to me! Thank you for the Python implementation, and especially for adding such comprehensive unit tests! |
jackye1995
pushed a commit
to jackye1995/lance
that referenced
this pull request
Jan 21, 2026
…e-format#5001) Close lance-format#5000. Refer to the implementation in the Java SDK. --------- Co-authored-by: xloya <xiaojiebao@apache.org>
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.
Close #5000. Refer to the implementation in the Java SDK.