Repository navigation
Commit 9512c3c
authored
[fix](binlog) wrap Row Binlog AFTER columns as nullable before conversion (#66553)
Issue Number: close #65951
Related PR: #65810
Problem Summary: Row Binlog makes normal non-key AFTER columns nullable
even when their source columns are NOT NULL. `OlapBlockDataConvertor`
derives the null map from the runtime source column, so a non-nullable
complex source provides no top-level null map. Nullable ARRAY, MAP, and
STRUCT writers can then leave their physical null child empty and abort
during segment finalization.
This PR keeps the fix local to Row Binlog:
- Wrap normal non-key AFTER source columns as `ColumnNullable<original>`
with an all-zero null map before conversion.
- Keep key columns unchanged, preserve original source columns in
`full_block`, and do not mutate the shared input Block.
- For partial-update missing AFTER columns, wrap each column filled from
the historical Rowset before conversion and append.
- Restore the original generic `ColumnWriter::append()` behavior and
remove the implicit null-map state, avoiding behavior changes in Scalar,
VARIANT, and other common write paths.
The test covers full updates, explicit partial updates, and partial
updates whose NOT NULL MAP/STRUCT values are filled from a historical
Rowset. It verifies logical readback and the physical top-level
null-child row count.
### Release note
Fix a BE crash when Row Binlog writes NOT NULL complex columns into
nullable AFTER columns.1 parent 634cbaa commit 9512c3c
3 files changed
Lines changed: 349 additions & 13 deletions
File tree
- be
- src/storage/segment
- test/storage/rowset
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
35 | 47 | | |
36 | 48 | | |
37 | 49 | | |
| |||
208 | 220 | | |
209 | 221 | | |
210 | 222 | | |
211 | | - | |
| 223 | + | |
212 | 224 | | |
213 | | - | |
| 225 | + | |
214 | 226 | | |
215 | 227 | | |
216 | 228 | | |
| |||
220 | 232 | | |
221 | 233 | | |
222 | 234 | | |
223 | | - | |
224 | | - | |
225 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
226 | 240 | | |
227 | 241 | | |
228 | 242 | | |
| |||
449 | 463 | | |
450 | 464 | | |
451 | 465 | | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
452 | 472 | | |
453 | 473 | | |
454 | 474 | | |
| |||
499 | 519 | | |
500 | 520 | | |
501 | 521 | | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
502 | 526 | | |
503 | | - | |
| 527 | + | |
504 | 528 | | |
505 | 529 | | |
506 | 530 | | |
507 | 531 | | |
508 | 532 | | |
509 | 533 | | |
510 | | - | |
511 | | - | |
512 | 534 | | |
513 | 535 | | |
514 | 536 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| |||
0 commit comments