Repository navigation
Read Arrow RunEndEncoded columns - #126207
Conversation
|
Workflow [PR], commit [9f9c4e9] Summary: ✅
AI ReviewSummaryAdds Missing context / blind spots
Final VerdictStatus: ✅ Approve. No further code changes requested; normal CI completion remains pending. |
…lk through the values field
…ared runs `hasRowsBackedByBuffers` now follows struct and fixed-size-list wrappers (and the map entries struct), so a long run inside a struct, list or fixed-size list is no longer rejected by the message-body row bound. `decodeRunEndEncoded` maps a row hidden by an ancestor's validity to a default value appended after the runs, so it decodes as the default even when it shares its run with visible rows, like a row of an unencoded field. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…EndEncoded` - The nulls of a `RunEndEncoded` field are those of its values: `isNullableField` derives the inferred and decoded nullability from the values child, regardless of the encoded parent's own flag, so a null run of a field declared non-nullable is no longer replaced by a default. - Map keys are never nullable: a `Nullable` key column (the values of a run-end-encoded key) is unwrapped after checking that no key is null. - `hasRowsBackedByBuffers` ignores bufferless (`Null`) children of a struct or fixed-size-list wrapper, so a struct of a long run and a `Null` field is not checked against the message body as if the `Null` field had buffers. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…alued `RunEndEncoded` run `insertDefault` on a `Tuple` inserts NULL into its `Nullable` elements, so a row hidden by a null ancestor in a struct-valued run decoded with nested NULLs, unlike the same unencoded field. Clear the null bits recursively through `Nullable` and `Tuple` (`clearLastDefaultNulls`), keeping only the `Null` type null. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🕵 @groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=126207&sha=343bc229209745a783a3429421faec2d56772161&name_0=PR&name_1=Unit%20tests%20%28asan_ubsan%2C%20function_prop_fuzzer%29 ( |
|
The fix is in progress: #126210. The stuck worker at The ASan fake stack of a worker fills up with frames left behind by exceptions from failed overload resolution, after which every per-element CIDB: 23 occurrences since 2026-10-15 (3 on master), 0 in the 640 runs of 2026-10-14. |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Object file sizes6 object files changed (+20.66 KiB total), 0 added.
719 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Compile time of recompiled translation units11 translation units recompiled, 34 s compile time in total, 11 of them have a recent master baseline. |
Resolve the conflicts of the cherry-pick of #132416 to 26.9. The fix applies in full; the differences from the original diff come only from master-only neighbours that 26.9 does not have: - `ArrowIPCBlockInputFormat.cpp`: 26.9 still checks that dictionary values are unique after registering them (master dropped the check in #125677). Keep the check and look the values up by the dictionary use, as the registry is now keyed by it. - `RecordBatchDecoder.cpp`: 26.9 has no `TypeKind::RunEndEncoded` case in `collectDictionaryUses` (run-end encoding, #126207, is master-only), so there is no call to pass `below_union` to there. The struct case keeps the 26.9 helpers `tupleElementHint` / `childPath` (master renamed them in #125674) and passes `below_union` as the original change does. - `RecordBatchDecoder.cpp`: include `base/scope_guard.h` for the two new `SCOPE_EXIT` uses. On master the include came with the big-endian reader (#126562); 26.9 does not include it, directly or transitively. - `RecordBatchDecoder.h`: no `[[nodiscard]]` on the changed declarations, as on the rest of the 26.9 file (master added them in #126158). Co-authored-by: yakov <[email protected]>
Resolve the conflicts of the cherry-pick of #132416 to 26.10. The fix applies in full; the differences from the original diff come only from master-only neighbours that 26.10 does not have: - `RecordBatchDecoder.cpp`: 26.10 has no `TypeKind::RunEndEncoded` case in `collectDictionaryUses` (run-end encoding, #126207, is master-only), so there is no call to pass `below_union` to there. The struct case keeps the 26.10 helpers `tupleElementHint` / `childPath` (master renamed them in #125674) and passes `below_union` as the original change does. - `RecordBatchDecoder.cpp`: include `base/scope_guard.h` for the two new `SCOPE_EXIT` uses. On master the include came with the big-endian reader (#126562); 26.10 does not include it, directly or transitively. - `RecordBatchDecoder.h`: no `[[nodiscard]]` on the changed declarations, as on the rest of the 26.10 file (master added them in #126158). Co-authored-by: yakov <[email protected]>
Closes: #125146
The native Arrow IPC reader now reads
RunEndEncodedcolumns as their values type, instead of rejecting them withUNKNOWN_TYPE.A run-end-encoded field has no buffers of its own and two children:
run_ends(Int16,Int32orInt64, the exclusive end of each run) andvalues(one value per run).RecordBatchDecoder::decodeRunEndEncoded:IColumn::index.decodeFieldhandles the field before the validity buffer (it has none, likeUnionandNull); the nulls are the nulls of the values.fieldToCHTypemaps the field to its values type, andcollectDictionaryUsesdescends into the values. Dictionary-encoded values are materialized, as for a nested dictionary, so the inferred type and the decoded column agree. The schema parser now checks that the run ends are an integer field.SkipLayout::RunEndEncodedis removed;advanceFieldskips the type as before.Tests:
05404_arrow_run_end_encoded: a pyarrow-written file and stream withInt16,Int32andInt64run ends, a null value, dictionary-encoded values, and a run-end-encoded field of a struct, with inferred and explicit structures.04345_native_arrow_ipc_skip_unsupported_columnusedRunEndEncodedas an example of a type that can be skipped but not read; requesting it now returns the values.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
The
ArrowandArrowStreaminput formats can readRunEndEncodedcolumns.Workflow [PR]
Sync PR [sync-upstream/pr/126207]
Version info
26.11.1.207-master(included in26.11and later)