Commit a8247c6
feat(blob): support placeholder fallback for partial updates
A data-evolution partial update rewrites only the touched rows of a
blob column and records every untouched row as a placeholder entry
(bin_length -2, no data bytes).
The blob format writes such entries only for partial updates: a
data-evolution blob-only column write enables the placeholder protocol
(BlobDefs::kWritePlaceholderKey), under which a value exactly equal to
the internal reserved marker _PAIMON_BLOB_PLACEHOLDER is persisted as
a bin_length -2 entry; any other write stores blob bytes verbatim, so
user data can never be turned into a placeholder. The reader fails on
placeholder entries unless the internal option
BlobDefs::kEmitPlaceholderSentinelKey switches it to emit the sentinel
for them. Placeholders are identified by exact byte equality only; a
user blob colliding with the marker inside the two internal channels
is accepted as negligibly improbable.
BlobBunch keeps all max-sequence layers of a bunch, and the new
BlobFallbackBatchReader resolves each row to the newest layer holding
a real value: an explicitly written null wins over older layers, a row
that is a placeholder in every layer degrades to a null blob while
keeping its _ROW_ID and reporting -1 as its _SEQUENCE_NUMBER, resolved
rows report their layer's sequence number, and row-range pushdown is
honored including the row id ranges a layer does not cover.
BlobFileBatchReader::GetPreviousBatchFileRowId now maps batch
positions back to original file row indexes through
target_blob_row_indexes_, so _ROW_ID completion keeps working when a
selection bitmap removed rows. CompleteRowTrackingFieldsBatchReader
takes the physical field names of a format without a self-describing
schema (blob) from DataFileMeta::write_cols instead of treating
NotImplemented as an empty file schema.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent f7edb6c commit a8247c6
30 files changed
Lines changed: 2413 additions & 259 deletions
File tree
- src/paimon
- common
- data
- reader
- core
- append
- io
- mergetree
- operation
- format/blob
- test/inte
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| |||
542 | 543 | | |
543 | 544 | | |
544 | 545 | | |
| 546 | + | |
545 | 547 | | |
546 | 548 | | |
547 | 549 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
48 | 94 | | |
49 | 95 | | |
50 | 96 | | |
| |||
0 commit comments