Repository navigation
Fix complex types schema evolution typos - #118127
Conversation
`ExecutableEvolutionFunction::pushNewNode` built the schema evolution path wrongly when descending into a `list` or `map` field of a struct: it pushed the edge that unwraps the container instead of the edge that enters the field by name, while the caller appends the unwrapping edge itself. For a column such as `outer STRUCT<items: ARRAY<STRUCT<...>>>` the path became `[ARRAY, ARRAY]` instead of `[STRUCT(items), ARRAY]`, so walking the type applied `static_pointer_cast<const DataTypeArray>` to a `DataTypeTuple` and `getNestedType` returned a garbage `shared_ptr`, crashing the server with `SIGSEGV` while the pipeline was being built. Containers at the root of a column were unaffected, because there the path is built solely by the caller, which is why the existing tests did not catch this. Also replace the unchecked `static_pointer_cast` calls used to walk the type with `typeid_cast` so that a mismatch throws an exception naming the actual type instead of reading memory at a wrong offset, and fold the four nearly identical walks into `resolveSchemaPath`.
|
Workflow [PR], commit [b9e1b3d] Summary: ✅
AI ReviewSummaryThis PR fixes PR Metadata
Final Verdict✅ Approve from a code-review standpoint. I found no code-level blockers; only the changelog entry should be tightened so the release note describes the actual LLVM Coverage ReportMeasured on commit b9e1b3d.
Changed lines: Changed C/C++ lines covered: 18/18 (100.00%) · Uncovered code |
|
This has caused a crash, probably should be a |
The equality delete file declares the `data` column as optional while the table schema has it required. Before #109551 the set for the `notIn` filter was built with the table-schema type and filled from the delete file columns of a different type, which failed in `ColumnString::insertRangeFrom` with `Too large size passed to allocator` (`LOGICAL_ERROR`) or a segmentation fault. Reuses the `eq_deletes_required_table` fixture through `icebergLocal`, so the test does not need MinIO and reproduces the failure on 26.4.5.143 locally. Related: #109551 Co-Authored-By: Claude Fable 5.1 <[email protected]>
Drop the refactoring so that the change against master is three lines and is easy to backport: `pushNewNode` records the struct field that holds a list or a map as a `STRUCT` edge (the container edge itself is appended by `lazyInitialize`), and `traverseAllPaths` descends into the value of a map entry instead of the whole `(key, value)` pair. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units7 translation units recompiled, 8 s compile time in total, 7 of them have a recent master baseline. |
Backport #118127 to 26.8: Fix complex types schema evolution typos
Backport #118127 to 26.6: Fix complex types schema evolution typos
Backport #118127 to 26.7: Fix complex types schema evolution typos
Backport #118127 to 26.3: Fix complex types schema evolution typos
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix complex types schema evolution typos
Workflow [PR]
Sync PR [sync-upstream/pr/118127]
Version info
26.8.3.42,26.7.7.75,26.6.5.106,26.3.33.47