Skip to content

Add test for #103508 - #104548

Merged
alexey-milovidov merged 3 commits into
masterfrom
milovidov/test-issue-103508
May 12, 2026
Merged

alexey-milovidov merged 3 commits into
masterfrom
milovidov/test-issue-103508

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented May 10, 2026 •

Copy link
Copy Markdown
Member

Add a regression test for NOT_FOUND_COLUMN_IN_BLOCK from #103508 (column timestamp renamed to timestamp_0 in distributed CTE when underlying table is non-empty). The bug no longer reproduces on master.

Closes #103508.

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

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

...

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Version info

  • Merged into: 26.5.1.566

@clickhouse-gh

clickhouse-gh Bot commented May 10, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [d1e9c7e]

Summary: ✅


AI Review

Summary

This PR adds a stateless regression test for #103508 and extends it to both single-shard and two-shard Distributed setups while pinning optimize_read_in_order = 1 to avoid unrelated random-settings instability. The current diff is focused, and I did not find unresolved correctness, safety, performance, or metadata issues.

Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-ci label May 10, 2026
…andom settings

The originally reported `NOT_FOUND_COLUMN_IN_BLOCK` in #103508 reproduces
with default settings on older builds and is fixed on master. However,
the analyzer still renames `__table1.timestamp` to `__table1.timestamp_0`
when `optimize_read_in_order = 0`, which random-settings runs in CI hit:

  Code: 10. DB::Exception: Not found column __table1.timestamp in block.
  There are only columns: __table1.timestamp_0, __global_row_index.

That is a separate, narrower path through the analyzer than the one
covered by this regression test. Pin the offending setting to `1` in the
query so the test reliably exercises the originally reported scenario.

CI report: #104548

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The single-shard `test_shard_localhost` does not exercise the remote
read path that the original `#103508` report observed. Add a second
query against `test_cluster_two_shards_localhost` (two shards on
`localhost:9000`) so the regression also covers the case where the
`Distributed` query fans out to multiple shards and merges the results
on the initiator.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

@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 May 12, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue May 12, 2026
alexbakharew added a commit that referenced this pull request May 12, 2026
Add a regression test for `NOT_FOUND_COLUMN_IN_BLOCK` from #103508 (column
`timestamp` renamed to `timestamp_0` in distributed CTE when underlying
table is non-empty). The bug no longer reproduces on master.

The analyzer still renames `__table1.timestamp` to `__table1.timestamp_0`
when `optimize_read_in_order = 0`, which random-settings runs in CI hit:

  Code: 10. DB::Exception: Not found column __table1.timestamp in block.
  There are only columns: __table1.timestamp_0, __global_row_index.

That is a separate, narrower path through the analyzer than the one
covered by this regression test. Pin the offending setting to `1` in the
query so the test reliably exercises the originally reported scenario.

Also cover a multi-shard cluster: the single-shard `test_shard_localhost`
does not exercise the remote read path that the original report observed.
A second query against `test_cluster_two_shards_localhost` (two shards on
`localhost:9000`) covers the case where the `Distributed` query fans out
to multiple shards and merges the results on the initiator.

Closes #103508.

Squashed from #104548 (commits
8c80956, 70a1ed2, d1e9c7e).

Co-Authored-By: Alexey Milovidov <[email protected]>
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Merged via the queue into master with commit bdebd9a May 12, 2026
325 of 326 checks passed
@alexey-milovidov
alexey-milovidov deleted the milovidov/test-issue-103508 branch May 12, 2026 15:43
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-synced-to-cloud The PR is synced to the cloud repo label May 12, 2026
alexbakharew added a commit that referenced this pull request May 13, 2026
…ts-only PRs

The previous trigger required *every* changed path to be a test file, but a
PR that adds a test alongside CI script / config / doc edits (a common shape
for "add regression test" or "fix CI" PRs) leaves the production ClickHouse
binary identical to the master baseline just the same — only the set of
tests running against that binary differs.

Replace `_only_tests_changed` (all paths are tests) with
`_binary_unchanged AND _tests_changed`, where `_binary_unchanged` is true iff
no path is production C/C++ source (i.e. `.cpp` / `.h` / … outside `tests/`,
`src/**/tests/`, and `contrib/`). This admits the common mixed PR while
still skipping PRs that touch real C++ sources (where the per-file diff
coverage report is the appropriate signal).

Observed on #104548 alongside
ci/jobs/llvm_coverage_job.py changes: the analysis was skipped because the
PR was no longer "tests-only" after the script edits, even though the
binary was unchanged.

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

Labels

pr-ci 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.

NOT_FOUND_COLUMN_IN_BLOCK — timestamp renamed to timestamp_0 in distributed CTE query when underlying table is non-empty (regression since 25.5)

2 participants