Skip to content

Stable 25.8 Backport of #85455 - Propagate query plan optimizations to correlated subquery input#2108

Closed
mkmkme wants to merge 4 commits into
stable-25.8from
backports/25.8/85455
Closed

Stable 25.8 Backport of #85455 - Propagate query plan optimizations to correlated subquery input#2108
mkmkme wants to merge 4 commits into
stable-25.8from
backports/25.8/85455

Conversation

@mkmkme

@mkmkme mkmkme commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Fixes #2051

Changelog category (leave one):

  • Improvement

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

Make query plan optimizations visible to the correlated subquery input subplan by postponing it's materialization (ClickHouse#85455 by @novikd).

Documentation entry for user-facing changes

...

CI/CD Options

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Performance tests
  • Aarch64 tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All Regression
  • Disable CI Cache

Regression jobs to run:

  • Fast suites (mostly <1h)
  • Aggregate Functions (2h)
  • Alter (1.5h)
  • Benchmark (30m)
  • ClickHouse Keeper (1h)
  • Iceberg (2h)
  • LDAP (1h)
  • OAuth (5m)
  • Parquet (1.5h)
  • RBAC (1.5h)
  • SSL Server (1h)
  • S3 (2h)
  • S3 Export (2h)
  • Swarms (30m)
  • Tiered Storage (2h)

novikd and others added 2 commits July 22, 2026 15:38
…ries-input-buffer

Propagate query plan optimizations to correlated subquery input
@mkmkme mkmkme added stable backport Backport 25.8 25.8 Altinity Stable stable-25.8 labels Jul 22, 2026
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

Workflow [PR], commit [cf43375]

@Altinity Altinity deleted a comment from blau-ai Jul 22, 2026
@mkmkme

mkmkme commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator Author

the fast test failed due to changes in this PR. Investigating

@CarlosFelipeOR

Copy link
Copy Markdown
Collaborator

The Stateless tests (amd_binary, ParallelReplicas, s3 storage, parallel) job crashes the server (server died) on this PR, on both the initial run and the re-run.

In both runs the server aborts inside ParallelReplicasReadingCoordinator (src/Storages/MergeTree/ParallelReplicasReadingCoordinator.cpp), and in both the crashing query is the same: SELECT count() FROM t_constraint_corr_root (from 04299_constraint_subst_correlated_subquery_root.sql, a correlated-subquery test).

  • Run 1 (job): Logical error: 'Initiator received more initial requests than there are replicas: replica_num=0'. Reported failing test: 02149_schema_inference_formats_with_schema_3.
  • Run 2 (re-run) (job): Logical error: 'Duplicate announcement received for replica number 0'. Reported failing test: 02751_multiquery_with_argument.

The reported failing test differs between the two runs (02149… vs 02751…) because it is simply whichever test was running in parallel when the server died — not the cause.

This server crash on ParallelReplicas is not present on the base branch stable-25.8 nor on any other PR in the CI database (gh-data.checks) over the last 90 days — it appears only on this PR.

@mkmkme we need to investigate and resolve this before merging.

@CarlosFelipeOR CarlosFelipeOR added the verified-with-issues Verified by QA and issues found. label Jul 23, 2026
@mkmkme

mkmkme commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator Author

Ilia raised a (very valid) concern that this PR introduces too many changes at the same time for no good reason. I totally agree with him.

From my point of view, I wanted to publish it to see whether it would break anything. Apparently it does break quite a few things, and I'm getting less and less confident in its state.

Let's close it.

@mkmkme mkmkme closed this Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

25.8 25.8 Altinity Stable 25.8.28.10001 backport Backport stable stable-25.8 verified-with-issues Verified by QA and issues found.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants