Repository navigation
Keep the window state layout of contingency, cramersV and theilsU out of -State results - #128685
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ow state layout Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [ebc4bf2] Summary: ✅
AI ReviewSummaryThe PR keeps states returned by window Missing context / blind spots
Final VerdictStatus: ✅ Approve. No additional code changes requested. |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Object file sizes22 object files changed (+235.59 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 units34 translation units recompiled, 127 s compile time in total, 34 of them have a recent master baseline. |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
…mbinator Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ssTab` family Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tion Co-Authored-By: Claude Opus 5.5 <[email protected]>
| { | ||
| auto rhs_nested = rhs.getNestedFunction(); | ||
| chassert(rhs_nested != nullptr); | ||
|
|
There was a problem hiding this comment.
maybe also chassert(canMergeStateFromDifferentVariant(rhs));
| } | ||
| } | ||
|
|
||
| public: |
There was a problem hiding this comment.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Backport #128685 to 26.10: Keep the window state layout of `contingency`, `cramersV` and `theilsU` out of `-State` results
Cherry pick #128685 to 26.8: Keep the window state layout of `contingency`, `cramersV` and `theilsU` out of `-State` results
Cherry pick #128685 to 26.9: Keep the window state layout of `contingency`, `cramersV` and `theilsU` out of `-State` results
…y`, `cramersV` and `theilsU` out of `-State` results
…y`, `cramersV` and `theilsU` out of `-State` results
…cy`, `cramersV` and `theilsU` out of `-State` results
…y`, `cramersV` and `theilsU` out of `-State` results
…y`, `cramersV` and `theilsU` out of `-State` results
Backport #128685 to 26.9: Keep the window state layout of `contingency`, `cramersV` and `theilsU` out of `-State` results
Backport #128685 to 26.8: Keep the window state layout of `contingency`, `cramersV` and `theilsU` out of `-State` results
contingency,cramersV,cramersVBiasCorrectedandtheilsUkeep a window function's state in a second memory layout (#93384). The type name and the binary type encoding do not show this layout. So when a-Stateresult of such a window function gets into a column, any code that makes the type again from its name (a spill to disk, aCAST, a distributed query plan) reads the state with the wrong layout. Earlier fixes corrected this at each place where it occurred.This PR makes
-Statealways build its nested function with the ordinary layout, so a window-layout state never leaves the window function. Finished results such ascramersV(...) OVER (...)keep the window layout.A
-Mergewindow function keeps the window layout and merges ordinary states into it, socramersVMerge(s) OVER (...)stays fast.-Mapnow supports this merge too (the change is taken from #119401), socontingencyMapMerge(s) OVER (...)works.ColumnAggregateFunctionnow throws aLOGICAL_ERRORexception if it gets a function with the window layout, so a new path that breaks this rule fails in tests instead of reading wrong memory.A window
-Stateresult and an ordinary-Stateresult now have the same type. Before, their types printed the same but were not equal, soUNION ALLof the two made aVariantthat-Mergecould not read, and only its`AggregateFunction(...)`subcolumn could be merged. NowUNION ALLgives the state type, and-Mergereads the column directly.Related: #93384
Related: #104277
Related: #109200
Related: #114020
Related: #119401
Related: #127800
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix a crash and wrong
TYPE_MISMATCHorCANNOT_CONVERT_TYPEerrors whencontingencyState,cramersVState,cramersVBiasCorrectedStateortheilsUStateis used as a window function and its result goes through a spill to disk, aCAST, or a distributed query plan.contingencyMapMergeand the other-MapMergefunctions of this family now work as window functions.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/128685]
Version info
26.11.1.1302-master(included in26.11and later)26.9.29.5,26.8.38.8