924060929 commented on code in PR #66913:
URL: https://github.com/apache/doris/pull/66913#discussion_r4056506759


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergExternalTable.java:
##########
@@ -322,14 +301,14 @@ public List<Column> getBaseSchemaForDisplay(boolean full) 
{
             return getBaseSchema(full);
         }
         try {
-            return catalog.getExecutionAuthenticator().execute(() -> {
+            return IcebergUtils.withIcebergTable(this, table -> {
                 // Schema-only changes need not advance the current snapshot. 
Resolve the current
                 // table schema and hidden columns from one retained metadata 
generation.
-                Table table = 
IcebergSnapshotCacheValue.retainTableGeneration(getIcebergTable());
-                List<Column> schema = 
IcebergUtils.parseSchemaForDisplay(table.schema(),
+                Table retainedTable = 
IcebergSnapshotCacheValue.retainTableGeneration(table);
+                List<Column> schema = 
IcebergUtils.parseSchemaForDisplay(retainedTable.schema(),
                         catalog.getEnableMappingVarbinary(), 
catalog.getEnableMappingTimestampTz());

Review Comment:
   Fixed in e1aa8daf1b4. Display conversion now receives the Iceberg table and 
both mapping flags from the same leased IcebergTableCacheValue, so a concurrent 
catalog reset cannot combine a G1 table with G2 mapping semantics. Added a 
deterministic G1(true,false) -> G2(false,true) reset-barrier test covering 
timestamp-with-zone and binary/varbinary, and verified the display path never 
reads the live catalog getters. IcebergExternalMetaCacheTest (87) and 
IcebergSchemaDisplayTest (11) pass; full ./build.sh --fe -j4 passes with 0 
Checkstyle violations.



-- 
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]

Reply via email to