Skip to content

PR: better parallelization with simple views - #100815

Merged
18 commits merged into
masterfrom
pr-view-pushdown
Apr 19, 2026
Merged

18 commits merged into
masterfrom
pr-view-pushdown

Conversation

@devcrafter

@devcrafter devcrafter commented Mar 26, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Performance Improvement

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

Better parallelization of queries with simple views (with underlying MergeTree table) executed with parallel replicas

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Version info

  • Merged into: 26.4.1.1060

@clickhouse-gh

clickhouse-gh Bot commented Mar 26, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [5c4a05b]

Summary: ❌

job_name test_name status info comment
Stateless tests (arm_asan_ubsan, targeted) failure
04061_pr_view_union_tables FAIL cidb
Stateless tests (amd_asan_ubsan, flaky check) failure
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
5 more test cases not shown
Stateless tests (amd_tsan, flaky check) failure
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
Stateless tests (amd_msan, flaky check) failure
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
Stateless tests (amd_debug, flaky check) failure
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
2 more test cases not shown
Stateless tests (amd_binary, flaky check) failure
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
10 more test cases not shown
Stateless tests (amd_asan_ubsan, distributed plan, parallel, 1/2) failure
04061_pr_view_union_tables FAIL cidb
04061_pr_view_union_tables FAIL cidb
Stateless tests (amd_asan_ubsan, distributed plan, parallel, 2/2) failure
01720_type_map_and_casts FAIL cidb
Stateless tests (amd_llvm_coverage, ParallelReplicas, s3 storage, parallel) failure
Server died FAIL cidb
Logical error: Step is expected to be ReadFromMergeTree but it's A (STID: 0250-36e3) FAIL cidb
Stateless tests (amd_llvm_coverage, ParallelReplicas, s3 storage, sequential) failure
04040_tpc_h_q15 FAIL cidb

AI Review

Summary

This PR enables parallel replicas for simple View queries over MergeTree via a new setting parallel_replicas_allow_view_over_mergetree (default enabled), wires planner capability checks for View, and adds stateless coverage for direct and UNION ALL views. After reviewing the diff, PR metadata, and current bot inline comments, I did not find additional high-confidence correctness, safety, or performance regressions beyond the already posted bot feedback.

ClickHouse Rules
Item Status Notes
Deletion logging ➖
Serialization versioning ➖
Core-area scrutiny ✅
No test removal ✅
Experimental gate ✅
No magic constants ✅
Backward compatibility ✅
SettingsChangesHistory.cpp ✅
PR metadata quality ✅
Safe rollout ✅
Compilation time ✅
Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-performance Pull request with some performance improvements label Mar 26, 2026
Comment thread src/Core/Settings.cpp Resolved
Comment thread src/Storages/StorageView.cpp Resolved
devcrafter and others added 9 commits March 26, 2026 16:44
…elReplicas`

Views using SQL SECURITY DEFINER with table functions like `s3Cluster`
fail to resolve with the caller's context due to missing privileges.
This is expected — just return nullptr without logging an error.

Fixes 03667_view_with_s3_cluster_and_sql_security_definer.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 84.10% 84.10% +0.00%
Functions 24.50% 24.40% -0.10%
Branches 76.70% 76.60% -0.10%

Changed lines: 96.51% (166/172) · Uncovered code

Full report · Diff report

@devcrafter devcrafter mentioned this pull request Mar 27, 2026
1 task done
@github-merge-queue github-merge-queue Bot closed this pull request by merging all changes into master in 3a0767f Apr 19, 2026
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Apr 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-performance Pull request with some performance improvements 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