github-actions[bot] commented on code in PR #70869:
URL: https://github.com/apache/doris/pull/70869#discussion_r4674961872
##########
fe/fe-connector/fe-connector-iceberg/src/main/java/org/apache/doris/connector/iceberg/IcebergScanPlanProvider.java:
##########
@@ -2204,6 +2205,46 @@ private static TFileFormatType
deleteFileFormat(FileFormat format) {
return null;
}
+ /** Resolve table-relative physical locations before storage-scheme
normalization. */
+ private UnaryOperator<String> newUriNormalizer(Table table, Map<String,
String> vendedToken) {
+ UnaryOperator<String> normalize = newUriNormalizer(vendedToken);
+ // Metadata-table properties omit the format version; native
delete-table ranges use the base version.
+ Table base = table instanceof BaseMetadataTable ? ((BaseMetadataTable)
table).table() : table;
+ if (getFormatVersion(base) < 4) {
+ return normalize;
+ }
+ FileIO io = table.io();
+ // Reuse the bound view: nesting relative resolvers would rebase
filesystem-rooted manifest version probes.
+ IcebergV4FileIO paths = io instanceof IcebergV4FileIO
+ ? (IcebergV4FileIO) io : new IcebergV4FileIO(io,
table.location());
+ return new V4UriNormalizer(paths, normalize);
Review Comment:
[P1] Share V4 provenance with every scan using the statement reader
With manifest caching enabled, two distinct scans of the same table in one
statement (for example, a self-join with different filters) share
`IcebergStatementScope.manifestReader`, which retains the first scan's
Table/FileIO. `wrapTableForScan` creates a new V4 FileIO for the later scan,
but `cachedOnly`/`readForStatement` prepare manifests only in the first
reader's IO. For a V2/V3-to-V4 table with rooted Avro manifests and scheme-less
data paths, this later normalizer calls `readManifestVersion` without a local
binding and throws `Manifest reference has not been bound`. Range normalization
happens after the cache-planner fallback boundary, so the query fails. Share
the frozen resolver or propagate each loaded descriptor's provenance into the
consuming scan, and cover two scans sharing a non-NONE statement scope. This
differs from the existing cross-table alias and nested-authentication reports:
the mismatch is between two consumers of one statement reader.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]