Repository navigation
Conversation
With skip_null set, a null in the update stream keeps the existing value of the matched row instead of overwriting it, so callers can send partial updates without reading old values first. Only top-level nulls are skipped: a non-null struct still replaces the old struct as a whole. An update row whose columns other than the join key are all null changes nothing, so it is dropped before the join: the row is unmatched, is excluded from matched_offsets, and keeps its _row_last_updated_at_version. Both the hash and the sort-merge update join honor the option. Exposed as UpdateJoinOptions::with_skip_null in Rust, the keyword-only skip_null argument of LanceFragment.update_columns in Python, and a Fragment.updateColumns(stream, leftOn, rightOn, skipNull) overload in Java. The default keeps the current behavior. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
✅ Gate recommendation: approve.
The opt-in null handling fits the existing fragment rewrite contract. The focused Rust tests passed for both join strategies, including struct replacement, matched offsets, committed row-version metadata, and all-null no-op inputs.
This branch has not been deployed
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.
Summary
Adds a
skip_nulloption to fragmentupdate_columns. With it set, a null in the update stream keeps the existing value of the matched row instead of overwriting it, so callers can send partial updates without reading the old values first.Semantics:
matched_offsets, and its_row_last_updated_at_versiondoes not change after arewrite_columnscommit. If every update row is like this, the call is a no-op, the same as an empty update stream.false) keeps the current behavior.Implementation
UpdateJoinOptions::with_skip_null/skip_null()carry the flag into the internalUpdateColumnsOptions.HashJoiner::with_skip_nullcomputes the RHS null masks once.collect_with_fallbackthen points null cells at the left row in the interleave indices, so each column is still materialized only once.SortedPatchCursor::merge_batchdoes the same per-column index rewrite on its patch batches.Bindings
skip_null=FalseonLanceFragment.update_columns.Fragment.updateColumns(stream, leftOn, rightOn, skipNull)overload. The 3-argument method delegates withskipNull = false.Tests
update_join::tests::test_update_skip_null: hash × sort-merge ×skip_null, with two fragments and an RHS split across batches. It covers a top-level null string, a top-level null struct, a non-null struct with a null child, an all-null row, an unmatched row,matched_offsets, and_row_last_updated_at_versionafter commit.test_empty_rhs_is_noop: new case for an RHS made only of all-null rows.test_fragment_update_columns_skip_nulland JavaUpdateTest.testUpdateColumnsare parameterized onskip_null, including offsets and version metadata.🤖 Generated with Claude Code