[core] Preserve sequence-group deletes in projected reads - #10135
JingsongLi merged 1 commit into
Conversation
1ebe383 to
284eb9e
Compare
|
This fixes a correctness issue with direct user impact: projected reads and Local verification on the isolated patch: all 47 |
Retain all ordering fields required by sequence groups that can delete whole rows, even when those fields are absent from the query projection. Add tests for empty, key-only and unrelated-field projections, including sequence groups with multiple ordering fields.
284eb9e to
282667b
Compare
Purpose
Closes #10134.
Column pruning can drop sequence fields needed to determine whether a partial-update row has been deleted. Consequently,
COUNT(*)and projected reads can return deleted rows even whenSELECT *correctly excludes them.Include whole-row deletion fields when deriving internal read dependencies and expand their complete ordering fields, including sequence groups with multiple ordering fields. Preserve the user-visible projection.
Tests
PartialUpdateMergeFunctionTest: 47 tests passed, covering empty, key-only, unrelated-field and reordered projections; single and multiple ordering fields; and newer, equal, older and null delete sequences.DeleteFromTableTestandV2DeleteFromTableTest: all 64 tests passed. The new regression uses two independent field-group writes and an explicit delete record, then checks full-row, count, key-only and other-group reads.