Repository navigation
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
|
ACTION NEEDED The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification. For details on the error please inspect the "PR Title Check" action. |
a05757f to
fb224e9
Compare
fb224e9 to
c26c489
Compare
|
c26c489 to
53e5204
Compare
53e5204 to
c7965e8
Compare
840f6eb to
66eb547
Compare
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e docs Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Document the constructor convention (`_unchecked`, `try_`, `*Parts`, `data_change`, decoding) once in the action module doc and drop the per-decoder certification comments. - Name fragment and field refs in constructor errors as "fragment 0" / "local fragment token 0" / "field 0" instead of their Debug form. - Restore `pub(super)` on per-action `is_data_change`; `Action` is the entry point. - Fix stale doc links and wording; build test actions through constructors and drop unused test setup. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… constructors Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
[AI-generated review comment] The Linux build on Could you update those fixtures from the current base to use the new constructors? The dependent parity tests in #10159 also fail to compile at these sites. Linux build log |
de69e45 to
7acc64d
Compare
Stacked on #8646. Replaces #10803, moved to a lance-format branch so the conflict-resolution PRs can stack on it.
Summary
Txn V2 actions had public fields, so nothing showed which ones make claims about storage that apply cannot check. This PR makes every field private and builds actions through constructors:
ConfigUpdate,AddField,DropIndex,ReserveRowIds, ...) getnew/try_newand builders.try_new_unchecked/new_unchecked, whose# Contractdoc lists what the caller certifies. For example,AddDataFile: the file exists, is a valid Lance file, holds the fragment's physical rows, and holds the declared fields. Most callers are expected to go through a higher-level writer API instead.AddFragment,AddIndexSegment,AdjustIndexCoverage) take a public-field*Partsstruct, so changing one field means certifying again:AddFragment::new_unchecked(AddFragmentParts { physical_rows: n, ..add.parts().clone() }).Checks that need only the action itself moved from
applyinto the constructors, and decoding goes through the constructors too. Checks against the table stay inapply. Changes in behavior:SetDeletionFileconstructor, which proto decode also calls.AddOverlaysno longer has adata_changefield, since apply already required it to be true. Decoding rejectsdata_unchanged = true.Evidence
Tests that relied on states that can no longer be built became constructor or decode tests. No coverage was dropped.
Merge Risk
Door: two-way.
lance-tableAPI only; the transaction wire format is unchanged.Blast Radius:
transaction(Txn V2 actions, which are experimental).🤖 Generated with Claude Code