github-actions[bot] commented on code in PR #69983:
URL: https://github.com/apache/doris/pull/69983#discussion_r4447679290
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergUtils.java:
##########
@@ -2320,25 +2326,38 @@ public static IcebergPartitionInfo
loadPartitionInfo(ExternalTable dorisTable, T
static IcebergPartitionInfo loadPartitionInfo(ExternalTable dorisTable,
Table table, long snapshotId,
long schemaId, ExecutionAuthenticator authenticator,
boolean enableMappingVarbinary, boolean enableMappingTimestampTz)
throws AnalysisException {
+ String displayName = dorisTable.getCatalog().getName() + "." +
dorisTable.getDbName()
+ + "." + dorisTable.getName();
+ return loadPartitionInfo(displayName, table, snapshotId, schemaId,
authenticator,
+ enableMappingVarbinary, enableMappingTimestampTz);
+ }
+
+ static IcebergPartitionInfo loadPartitionInfo(String displayName, Table
table,
+ long snapshotId, long schemaId, ExecutionAuthenticator
authenticator,
+ boolean enableMappingVarbinary, boolean enableMappingTimestampTz)
throws AnalysisException {
if (snapshotId == IcebergUtils.UNKNOWN_SNAPSHOT_ID) {
return IcebergPartitionInfo.empty();
}
List<IcebergPartition> icebergPartitions;
+ List<Column> partitionColumns;
try {
icebergPartitions = authenticator.execute(() ->
loadIcebergPartition(table, snapshotId));
+ // A retained projection may outlive its catalog cache group. Its
columns and ranges
+ // must use the same frozen table/schema, without looking up a new
catalog generation.
Review Comment:
[P2] Preserve Iceberg schema validation when deriving lazy partition metadata
The new retained-table path calls `buildTableSchemaCacheValue(table,
parseSchema(...))` directly, while the previous path went through
`getIcebergSchemaCacheValue`, whose loader calls
`SchemaCacheValue.validateSchema()` and rejects case-insensitive duplicate
columns. A table with fields such as `Foo` and `foo` can therefore enter
MV/dictionary partition range or snapshot derivation through this lazy loader
even though normal Iceberg schema access rejects the same table. Validate the
parsed schema before deriving partition columns, while retaining the existing
`AnalysisException` context, so this path fails closed consistently.
--
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]