Skip to content

Prepare the hypothetical object store code for projections - #115763

Merged
yariks5s merged 3 commits into
masterfrom
yarik/whatif-rename-object-store
Aug 21, 2026
Merged

yariks5s merged 3 commits into
masterfrom
yarik/whatif-rename-object-store

Conversation

@yariks5s

@yariks5s yariks5s commented Aug 21, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...


Workflow [PR]
Sync PR [sync-upstream/pr/115763]

Version info

  • Merged into: 26.8.1.1873 (included in 26.8 and later)

@yariks5s
yariks5s requested a review from nihalzp August 21, 2026 11:05
@clickhouse-gh

clickhouse-gh Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [a9f54ff]

Summary: ✅


AI Review

Summary

This PR is a behavior-preserving refactor around EXPLAIN WHATIF: it renames the session-scoped hypothetical index store to HypotheticalObjectStore, extracts the result payload into WhatIfResult, and updates the callers and formatter to use the new names. I did not find a correctness, safety, or performance regression in the current diff; the main remaining limitation is that my confidence comes from code inspection plus the current all-green PR CI, not from additional local execution.

Final Verdict

✅ No findings.

LLVM Coverage Report

Metric Baseline Current Δ
Lines 87.00% 87.00% +0.00%
Functions 91.90% 91.90% +0.00%
Branches 79.30% 79.30% +0.00%

Changed lines: Changed C/C++ lines covered: 183/210 (87.14%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Aug 21, 2026
@nihalzp nihalzp self-assigned this Aug 21, 2026
@yariks5s
yariks5s enabled auto-merge August 21, 2026 12:47
@clickhouse-gh

clickhouse-gh Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing a9f54ff71 with master ef2f79b62 (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes
Binary Master PR Δ
programs/clickhouse-stripped 704.42 MiB 701.40 MiB -3.02 MiB (-0.43%)

Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction.

Object file sizes

189 object files changed (+81.09 KiB total), 1 added.

Object file Master PR Δ
src/CMakeFiles/dbms.dir/Interpreters/HypotheticalObjectStore.cpp.o new 60.34 KiB +60.34 KiB

738 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only clickhouse-bundle) and not compared.

Compile time of recompiled translation units

1599 translation units recompiled, 9205 s compile time in total, 1598 of them have a recent master baseline.

Job report

@yariks5s
yariks5s added this pull request to the merge queue Aug 21, 2026
Merged via the queue into master with commit 7e1c82b Aug 21, 2026
351 of 352 checks passed
@yariks5s
yariks5s deleted the yarik/whatif-rename-object-store branch August 21, 2026 18:22
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Aug 21, 2026
middas-0706 pushed a commit to middas-0706/ClickHouse that referenced this pull request Nov 7, 2026
…ColumnsPass

The pass set the type of every reference to an ARRAY JOIN column (the first
argument of `tupleElement`) to the type of the ARRAY JOIN expression, for every
expression, pruned or not. The analyzer can give a reference a different type
than the definition: `join_use_nulls` (ARRAY JOIN on the nullified side of a
RIGHT/FULL JOIN) and `group_by_use_nulls` (the column is a ROLLUP/CUBE key)
make it `Nullable`, and a `USING` key gives it the common supertype. After the
overwrite `tupleElement` was re-resolved to the narrower type while its parent
function still expected the old one, so the query tree validator of debug and
sanitizer builds threw `LOGICAL_ERROR` "Function tupleElement(__array_join_exp_1,
'a') > 0 expects argument 1 to have Nullable(Int64) type but receives Int64 after
running PruneArrayJoinColumns pass". Release builds were not affected: the
planner rebuilds a function whose argument types do not match.

Now `pruned_type` is set only when `pruneNestedFunctionArguments` actually
pruned the expression, so references of other expressions keep their type, and
a reference of a pruned expression keeps its own `Nullable`. A `USING` key or a
matcher column is a direct reference, which marks the expression fully used,
so it is never pruned.

Found by the server-side AST fuzzer in Stress tests (PR ClickHouse#126991, ClickHouse#118582,
ClickHouse#115763).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants