Repository navigation
Backport #116129 to 26.3: Fix iceberg identity partitioned reading - #116673
Closed
robot-ch-test-poll2 wants to merge 6 commits into
Closed
robot-ch-test-poll2 wants to merge 6 commits into
robot-ch-test-poll2 wants to merge 6 commits into
Conversation
Contributor
|
Workflow [BackportPR], commit [88abfb2] Summary: ❌
|
Every build fails on this branch with:
src/Storages/ObjectStorage/DataLakes/Iceberg/Utils.h:108:30:
error: use of undeclared identifier 'avro'
108 | std::function<void(const avro::GenericDatum &)> callback);
`26.3` never had `forEachAvroEntry`: it arrived on master in 8fe1d61
("Extract forEachAvroEntry helper for iceberg avro readers"), which is not on
this branch. That commit added both the declaration and the
`namespace avro { class GenericDatum; }` forward declaration it needs.
The cherry-pick of #116129 appends `getIdentityPartitionColumnValues` directly
below `forEachAvroEntry`, so it pulled the `forEachAvroEntry` declaration in as
part of the hunk, but not the forward declaration - that sits higher up in the
file, outside any hunk this cherry-pick touches. The definition in `Utils.cpp`
came along too and compiles, because that translation unit includes the real
avro headers; only the header was left without a declaration.
Add the forward declaration, byte-identical to master's and in the same place
relative to the includes. `avro::GenericDatum` is only used here as a reference
inside a `std::function` parameter, so an incomplete type is sufficient - the
same way master uses it.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Resolved one conflict in `src/Storages/ObjectStorage/StorageObjectStorageSource.cpp`, where two unrelated changes land on adjacent lines. - Operands: kept this branch's `row_level_filter` / `prewhere_info`. #116129 introduces those locals just above and rewrites them through `substituteIdentityPartitionColumns` when the filter reads an identity partition column - that substitution is the whole point of the PR, so reverting to `format_filter_info->...` would undo the fix. - `current_schema_column_mapper`: dropped, taking the release-branch side. It is not part of #116129 (that PR does not touch `src/Formats/` at all); it is master-only code that predates it and the cherry-pick pulled in as adjacent context. `FormatFilterInfo` has no such member on `26.3`, so it would not have compiled - a second build break, latent only because ninja stopped at the `avro` error in `Utils.h` before reaching this file. Checked that nothing else references `current_schema_column_mapper`, and that every symbol the merged code uses exists on this branch. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Member
|
This seems difficult to backport, not sure if worth to proceed |
…AndName` The cherry-pick brought master's three-argument `addColumn(column, type, name)`; splitting the argument out is a later change that is not in this branch, where `addColumn` still takes one `ColumnWithTypeAndName`: error: no viable conversion from 'ColumnPtr' (aka 'immutable_ptr<DB::IColumn>') to 'ColumnWithTypeAndName' Build the `ColumnWithTypeAndName` explicitly at both call sites, which is behaviour-neutral.
The cherry-pick brought master's way of resolving a data file's
storage path:
persistent_table_components.path_resolver.resolve(data_file->parsed_entry->file_path_key)
`PersistentTableComponents::path_resolver` comes with
`IcebergPathResolver` (#99163), which replaced
`getProperFilePathFromMetadataInfo` and is not in this branch - 26.3
was cut about seven hours before it merged - so both builds failed
with
error: no member named 'path_resolver' in 'DB::Iceberg::PersistentTableComponents'
In this branch the resolution has already happened by then:
`ManifestFileIterator` computes it once per entry with
`getProperFilePathFromMetadataInfo(parsed_entry->file_path_key,
common_path, table_location)` and stores it as
`ProcessedManifestFileEntry::file_path` ("Computed file path for
Object Storage"), which is exactly what the pre-cherry-pick
`IcebergDataObjectInfo` constructor read. So pass that field, which is
what the neighbouring code in `IcebergIterator.cpp` already does.
The build failed on
error: unused variable 'data_file_path' [-Werror,-Wunused-variable]
because the cherry-pick brought the comment of the keying fix but not
the code: the three lookups still used
`manifest_file.manifest_file_path` while the comment right above them
already explained why that is wrong -
/// One DataFilePlan per source *data file*, keyed by the data file's own path.
/// Keying by the manifest path made every data file after the first in a
/// manifest reuse the first file's plan, so writeDataFiles rewrote only one
/// file per manifest and the rest of the manifest's data silently disappeared
/// from the compacted table.
So `-Werror` caught a real hole rather than a stylistic one. Use
`data_file_path` for the `contains` check and both map accesses, which
is what `master` does.
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 #116129
Cherry-pick pull-request #116572
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