Antalya 26.3: mkmk-1: combined port of 2 PRs#1677
Draft
zvonand wants to merge 1 commit intoantalya-26.3from
Draft
Antalya 26.3: mkmk-1: combined port of 2 PRs#1677zvonand wants to merge 1 commit intoantalya-26.3from
zvonand wants to merge 1 commit intoantalya-26.3from
Conversation
…o-assertion Fix exception in `updateFormatPrewhereInfo` when only row-level filter is set Source-PR: ClickHouse#100361 (ClickHouse#100361)
Collaborator
|
I'll have a look at it tomorrow, too busy today |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix exception "Logical error:
prewhere_info" when querying URL/S3 Parquet tables with a row-level security policy and no PREWHERE clause (ClickHouse#100361 by @alexey-milovidov, #1597 by @mkmkme).CI/CD Options
Exclude tests:
Regression jobs to run:
Combined port of 2 PR(s) (group
mkmk-1). Cherry-picked from ClickHouse#100361, #1597.updateFormatPrewhereInfowhen only row-level filter is set ClickHouse/ClickHouse#100361 — Fix exception inupdateFormatPrewhereInfowhen only row-level filter is setClickHouse#100361: Fix exception in
updateFormatPrewhereInfowhen only row-level filter is setupdateFormatPrewhereInfoasserted thatprewhere_infowas non-null, but callers inStorageObjectStorageandStorageURLinvoke it when eitherprewhere_infoorrow_level_filteris set. When a row policy exists on a URL/S3 table with Parquet format (which supports PREWHERE) and the query has no PREWHERE clause, onlyrow_level_filteris populated — triggering the assertion.Additionally,
row_level_filterwas never stored into the newReadFromFormatInfo, so it would be silently lost.Fix: relax the assertion to accept either being set, and store
row_level_filterin the output.Found in: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=99537&sha=e2a32dfbb945f62e07bd3f66c206a71b584b96b1&name_0=PR&name_1=Stress%20test%20%28amd_debug%29
ClickHouse#99537
Documentation entry for user-facing changes
#1597: Antalya-26.1: Fix row policies silently ignored on Iceberg tables with PREWHERE enabled
The Iceberg read optimization (
allow_experimental_iceberg_read_optimization) identifies constant columns from Iceberg metadata and removes them from the read request. When all requested columns become constant, it setsneed_only_count = true, which tells the Parquet reader to skip all initialization — includingpreparePrewhere— and just return the raw row count from file metadata.This completely bypasses
row_level_filter(row policies) andprewhere_info, returning unfiltered row counts. The InterpreterSelectQuery relies on the storage to apply these filters whensupportsPrewhereis true and does not add a fallback FilterStep to the query plan, so the filter is silently lost.The fix prevents
need_only_countfrom being set when an activerow_level_filterorprewhere_infoexists in the format filter info.Fixes #1595
Documentation entry for user-facing changes
...