Repository navigation
Backport #109551 to 26.3: Fix crash in Iceberg due to type confusion - #119203
Merged
Merged
Conversation
Contributor
|
Workflow [BackportPR], commit [57ae2fe] Summary: ✅ |
1 task
Member
|
Backporting #99935 to merge this |
`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.
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.
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
26.3.33.76