Skip to content

Add test: No test for _part_starting_offset + _part_offset IN subquery (query-then-fetch) or range conditions - #101750

Closed
clickgapai wants to merge 1 commit into
ClickHouse:masterfrom
clickgapai:qa-bot/coverage-pr79417
Closed

clickgapai wants to merge 1 commit into
ClickHouse:masterfrom
clickgapai:qa-bot/coverage-pr79417

Conversation

@clickgapai

Copy link
Copy Markdown
Contributor

Found via ClickGap automated review. Please close or comment if this is incorrect or needs adjustment.

Retrospective finding from a historical scan of PR #79417 (merged 2025-04-29). Confirmed on current codebase — close with a note if already fixed.

Adds test coverage for 1 untested code path(s), found during automated review of PR #79417.

1. No test for _part_starting_offset + _part_offset IN subquery (query-then-fetch) or range conditions
src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp:502
Why this test: buildKeyConditionFromTotalOffset (MergeTreeDataSelectExecutor.cpp:502) constructs key conditions that support IN and range operations, but the PR's test only exercises equality (= 8)
What's unique: PR's test 03443_part_starting_offset.sql only tests equality condition (_part_starting_offset + _part_offset = 8). This test covers IN subquery pattern (the primary use case from PR description), rang

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

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

Not applicable — test-only change.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Found during review of PR #79417.

@CurtizJ CurtizJ added the can be tested Allows running workflows for external contributors label Apr 21, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Dear @CurtizJ, you haven't been active on this PR for 30 days. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself.

@clickhouse-gh clickhouse-gh Bot assigned CurtizJ and unassigned CurtizJ Jun 1, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Dear @CurtizJ, you haven't been active on this PR for 30 days. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself.

@zlareb1

zlareb1 commented Aug 10, 2026

Copy link
Copy Markdown
Member

@groeneai can you take this up and open a new PR?

@zlareb1 zlareb1 closed this Aug 10, 2026
@groeneai

Copy link
Copy Markdown
Collaborator

Taking this up. Triaged against master 2850e469dcac84b before answering.

Verified: src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp:502 still present; test passes on master and output matches the reference.

It will be re-filed as part of an area-grouped PR rather than its own PR, to keep reviewer load down (26 in this batch plus 18 from the earlier one today). Full triage and the grouping plan: #101781 (comment)

@groeneai

Copy link
Copy Markdown
Collaborator

Re-filed as #114305, the MergeTree/index group, covering this gap together with three others from the same batch.

Adopted as 04489_part_starting_offset_in_subquery with both the subquery and the literal-list spelling kept: they reach buildKeyConditionFromTotalOffset through different dispatches (binary search vs generic exclusion search) and redden independently, so neither is redundant.

Two changes from the original. The max_rows_to_read bound is 2, not 1 - measured against query_log.read_rows by bisection rather than assumed. And enable_parallel_replicas = 0 is pinned, because max_rows_to_read is counted per reading node: without the pin the test failed 2 runs in 30 under a parallel-replicas profile with TOO_MANY_ROWS ... While executing Remote, which is intermittent enough to survive a 50-run check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants