Skip to content

Add ExtractColumnsStep::clone and "Not-ready Set" regression tests - #130373

Merged
alexey-milovidov merged 1 commit into
masterfrom
extract-columns-step-clone
Nov 10, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
extract-columns-step-clone

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Related: #102192
Related: #107924

Split out of #102192 (part 1 of 6).

#107924 made FutureSetFromSubquery::buildOrderedSetInplace run the speculative in-place set build of an IN subquery against a clone of the source plan, so that a silent in-place failure (e.g. timeout_overflow_mode = 'break') no longer leaves the set permanently unbuilt with the "Not-ready Set is passed as the second argument" exception. Plans with a step that does not implement IQueryPlanStep::clone still take the old destructive path.

This PR:

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

🤖 Generated with Claude Code


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

Version info

  • Merged into: 26.11.1.1842-master (included in 26.11 and later)

Split out of #102192.

`ExtractColumnsStep` did not implement `clone`, so an `IN` subquery whose
source plan contains it made `FutureSetFromSubquery::buildOrderedSetInplace`
take the destructive fallback introduced in
#107924.

Also add the regression tests for the "Not-ready Set is passed as the second
argument" exception fixed by #107924, using the
`prepared_sets_build_ordered_set_inplace_fail` failpoint: the original
parallel replicas reproducer and a `WITH FILL` subquery source plan.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [56358a8]

Summary: ✅


AI Review

Summary

Adds ExtractColumnsStep::clone and regression coverage for recovery from speculative IN set-build failures with parallel replicas and WITH FILL. Reviewed commit 56358a8b85aa1b3c5f5e40d9d20ac15250d5da8e; no actionable findings. Both regression tests passed locally using the PR's CI binary, with an added probe confirming that each consumed the failpoint.

Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added pr-not-for-changelog This PR should not be mentioned in the changelog comp-query-optimizer Query plan optimization: physical plan steps, plan-level rewrites and optimizations (QueryPlan pa... labels Nov 9, 2026
@clickhouse-gh

clickhouse-gh Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 56358a8b8 with master 213bd8dd0 (stripped binary size, per-symbol sizes and ThinLTO time; object sizes against the warmup build of 35e918caf; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Compile time of recompiled translation units

8 translation units recompiled, 31 s compile time in total, 8 of them have a recent master baseline.

Job report

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

@alexey-milovidov alexey-milovidov self-assigned this Nov 10, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Nov 10, 2026
Merged via the queue into master with commit 844726e Nov 10, 2026
362 checks passed
@alexey-milovidov
alexey-milovidov deleted the extract-columns-step-clone branch November 10, 2026 11:15
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-query-optimizer Query plan optimization: physical plan steps, plan-level rewrites and optimizations (QueryPlan pa... 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.

2 participants