Commit 7da06ab
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 equal to the
placeholder sentinel is persisted as a bin_length -2 entry and a
sentinel-prefixed real value is unescaped; 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, escaping stored values that start with the sentinel bytes so
the fallback merge can never mistake real data for placeholders.
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.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent f449a9f commit 7da06ab
28 files changed
Lines changed: 2372 additions & 232 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 | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| |||
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 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
48 | 104 | | |
49 | 105 | | |
50 | 106 | | |
| |||
0 commit comments