CalvinKirs commented on code in PR #63068:
URL: https://github.com/apache/doris/pull/63068#discussion_r3361916888
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergUtils.java:
##########
@@ -1641,7 +1664,58 @@ private static Optional<SchemaCacheValue>
loadTableSchemaCacheValue(ExternalTabl
}
}
}
- return Optional.of(new IcebergSchemaCacheValue(schema, tmpColumns));
+ return new IcebergSchemaCacheValue(schema, tmpColumns);
+ }
+
+ private static IcebergSnapshotCacheValue
loadSnapshotCacheValue(ExternalTable dorisTable, Table icebergTable) {
Review Comment:
loadSnapshotCacheValue is only ever called with an` IcebergExternalTable
(via IcebergExternalTable#getLatestSnapshotCacheValue →
IcebergUtils.getLatestSnapshotCacheValue(this))`, and `IcebergExternalTable`
implements `MTMVRelatedTableIf`. So the cast always succeeds
for any real Iceberg table; the instanceof guard is a defensive fail-fast
for an unexpected programming error (a non-Iceberg table
reaching this path), not a user-reachable condition. The MTMVRelatedTableIf
view is used only for isValidRelatedTable() /
partition-info loading. Happy to rename the method or soften the "MTMV
related table" message if that reads clearer, but the cast
itself is safe.
--
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]