Skip to content

Revert "Fix exception in adjustLastGranule with constant PREWHERE and patch parts"#96574

Merged
alexey-milovidov merged 1 commit intomasterfrom
revert-95056-fix-adjust-last-granule-const-prewhere
Feb 10, 2026
Merged

Revert "Fix exception in adjustLastGranule with constant PREWHERE and patch parts"#96574
alexey-milovidov merged 1 commit intomasterfrom
revert-95056-fix-adjust-last-granule-const-prewhere

Conversation

@KochetovNicolai
Copy link
Copy Markdown
Member

Reverts #95056

It introduced a bug. For datasets.hits_v1 from tests/docker_scripts/create.sql:

SELECT DISTINCT EventDate
FROM datasets.hits_v1
SETTINGS max_block_size = 8482, max_threads = 2

Query id: e980477c-9a37-49fd-8e87-da69b3dcdd56

   ┌──EventDate─┐
1. │ 2014-03-22 │
2. │ 2014-03-23 │
3. │ 2014-03-17 │
4. │ 2014-03-18 │
5. │ 2014-03-19 │
6. │ 2014-03-20 │
7. │ 2014-03-21 │
8. │ 1970-01-01 │ <-------  This row should not appear.
   └────────────┘

@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh Bot commented Feb 10, 2026

Workflow [PR], commit [2d6f2e4]

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Feb 10, 2026
@alexey-milovidov alexey-milovidov merged commit 2d046da into master Feb 10, 2026
6 of 10 checks passed
@alexey-milovidov alexey-milovidov deleted the revert-95056-fix-adjust-last-granule-const-prewhere branch February 10, 2026 15:49
@alexey-milovidov alexey-milovidov self-assigned this Feb 10, 2026
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Feb 10, 2026
alexey-milovidov added a commit that referenced this pull request Feb 10, 2026
…nd patches

Add two tests related to #96574:

- `03830_no_zero_rows_with_unaligned_block_size`: Regression test verifying
  no spurious zero-filled rows (e.g. `1970-01-01` for Date columns) appear
  when reading with `max_block_size` that doesn't align with `index_granularity`.
  This was the bug introduced by PR #95056 that was reverted by PR #96574.

- `03830_prewhere_const_with_patches`: Tests correctness of constant PREWHERE
  expressions on tables with patch parts from lightweight updates, covering the
  original fuzzer finding from issue #94700.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hanfei1991 hanfei1991 added the post-approved Approved, but after the PR is merged. label Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

post-approved Approved, but after the PR is merged. 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.

4 participants