Skip to content

Follow up #98783 - #99355

Merged
alexey-milovidov merged 4 commits into
masterfrom
follow_up_98783
Mar 13, 2026
Merged

alexey-milovidov merged 4 commits into
masterfrom
follow_up_98783

Conversation

@nickitat

@nickitat nickitat commented Mar 12, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

ColumnBLOB shouldn't support any data access/modification methods by its initial design. It's fine if we would like to reconsider this in the future, but I don't really like the idea of supporting one random method. So, the crutch moved into a different place.


Note

Medium Risk
Changes query pipeline behavior for non-main streams (totals/extremes) to bypass block marshalling, which could affect how these outputs are serialized or handled. Also removes ColumnBLOB::cut, so any remaining callers will now fail loudly instead of silently delegating.

Overview
Removes the special-case ColumnBLOB::cut implementation so ColumnBLOB no longer supports any data access/modification APIs and will always throw unless converted back to a regular column.

Updates BlocksMarshallingStep to only apply MarshallBlocksTransform to the main stream, explicitly skipping totals/extremes to avoid IOutputFormat::prepareTotals calling cut on ColumnBLOB columns.

Written by Cursor Bugbot for commit d91b4c5. This will update automatically on new commits. Configure here.

Version info

  • Merged into: 26.3.1.634

@clickhouse-gh

clickhouse-gh Bot commented Mar 12, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [d91b4c5]

Summary: ✅


AI Review

Summary

This PR removes the ad-hoc ColumnBLOB::cut exception and instead avoids marshalling non-main streams in BlocksMarshallingStep, which addresses the prepareTotals/cut incompatibility more cleanly. I found one major gap: the fix is not covered by a dedicated regression test for the affected totals/extremes path.

Missing context

  • ⚠️ No CI test logs or explicit evidence of a new regression test covering WITH TOTALS/extremes with block marshalling were provided.

Findings

  • ⚠️ Majors
    • [src/Processors/QueryPlan/BlocksMarshallingStep.cpp:66] The behavioral change that skips marshalling for non-main streams fixes a real exception path, but there is no targeted regression test in this PR to protect it. This is easy to break in later refactors because the failure depends on a specific pipeline/format interaction.
    • Suggested fix: add a stateless or integration regression test that runs a distributed query with WITH TOTALS (and optionally extremes) and verifies no ColumnBLOB-related exception is thrown on output.

Tests

  • ⚠️ Add a regression test for WITH TOTALS through the distributed pipeline path where BlocksMarshallingStep is active, to ensure prepareTotals never sees ColumnBLOB.

ClickHouse Rules

Item Status Notes
Deletion logging ➖
Serialization versioning ➖
Core-area scrutiny ✅
No test removal ✅
Experimental gate ➖
No magic constants ✅
Backward compatibility ✅
SettingsHistory.cpp ➖
Safe rollout ⚠️ Behavior changed without a dedicated regression test for the affected stream types.
Compilation time ✅

Final Verdict

  • Status: ⚠️ Request changes
  • Minimum required actions:
    1. Add a regression test covering the non-main stream (WITH TOTALS/extremes) path with BlocksMarshallingStep enabled.

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Mar 12, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

@clickhouse-gh

clickhouse-gh Bot commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 83.80% 83.80% +0.00%
Functions 23.90% 23.90% +0.00%
Branches 76.30% 76.30% +0.00%

PR changed lines: PR changed-lines coverage: 70.59% (12/17)
Diff coverage report
Uncovered code

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Perfect, thanks for fixing in the right place!

@alexey-milovidov alexey-milovidov self-assigned this Mar 13, 2026
@alexey-milovidov
alexey-milovidov merged commit 6b5d55d into master Mar 13, 2026
160 checks passed
@alexey-milovidov
alexey-milovidov deleted the follow_up_98783 branch March 13, 2026 03:15
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Mar 13, 2026
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