Skip to content

Backport #109551 to 26.3: Fix crash in Iceberg due to type confusion - #119203

Merged
PedroTadim merged 2 commits into
26.3from
backport/26.3/109551
Sep 14, 2026
Merged

PedroTadim merged 2 commits into
26.3from
backport/26.3/109551

Conversation

@robot-clickhouse-ci-1

@robot-clickhouse-ci-1 robot-clickhouse-ci-1 commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Original pull-request #109551
Cherry-pick pull-request #109773

This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.

The PR source

The PR is created in the CI job

Version info

  • Merged into: 26.3.33.76

@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-critical-bugfix labels Sep 10, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [57ae2fe]

Summary: ✅

@PedroTadim

Copy link
Copy Markdown
Member

Backporting #99935 to merge this

@clickhouse-gh clickhouse-gh Bot added the external Author is not a member of the ClickHouse organization label Sep 11, 2026
@maxknv maxknv removed the external Author is not a member of the ClickHouse organization label Sep 11, 2026
`03595_equality_deletes_simple` fails on this backport at the query
the backport adds:

    Code: 499. DB::Exception: Failed to get object info: No response body..
    HTTP response code: 404: while reading
    se/default/eq_deletes_required_table/metadata/snap-667782107838695408-1-...avro.
    (S3_ERROR)

Note the key: `se/default/...`. The path is mangled, not missing. The
table's metadata declares

    "location": "/out/warehouse/default/eq_deletes_required_table"

(the directory was copied from a Spark warehouse as is, as its README
records), while the test queried it as
`deletes_db/eq_deletes_required_table`. This branch resolves every
Iceberg path with `getProperFilePathFromMetadataInfo`, whose fast path
requires the declared `location` to end with the queried path. It does
not here, so resolution falls into its "data and metadata in different
directories" branch, which strips
`table_location.size() - common_path.size()` = 12 characters - the
length of `/out/warehou` - off the front and yields `se/default/...`.
The query therefore dies during schema inference and never reaches the
equality-delete code the pull request fixes, so the added case was
vacuous on this branch either way.

`IcebergPathResolver`, which keys its fast path off `table_location`
alone and rebases onto a separately derived table root, came with
#99163; 26.3 was cut about seven hours before it merged.

So the directory is moved to `data_minio/default/eq_deletes_required_table`
and the query asks for `default/eq_deletes_required_table`, which makes
the queried path a component-aligned suffix of the declared `location`
and puts the resolution on the fast path for the manifest list, the
manifest and both parquet files alike. File contents are untouched -
the paths embedded in the Avro files are deflate-compressed and cannot
be rewritten in place, and a metadata-only rewrite would land in the
same bad branch. The reference is unchanged: `bar` / `world` is
correct, and it is what 26.6, 26.7, 26.8 and master produce.
@PedroTadim
PedroTadim merged commit 1a3cbfb into 26.3 Sep 14, 2026
34 checks passed
@PedroTadim
PedroTadim deleted the backport/26.3/109551 branch September 14, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-critical-bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants