github-actions[bot] commented on code in PR #69632:
URL: https://github.com/apache/doris/pull/69632#discussion_r4376437992


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergExternalTable.java:
##########
@@ -276,12 +281,18 @@ protected boolean needInternalHiddenColumns() {
 
     @Override
     public List<Column> getFullSchema() {
-        return getFullSchema(MvccUtil.getSnapshotFromContext(this));
+        return withMissingTableRepair(() -> {
+            return getFullSchema(MvccUtil.getSnapshotFromContext(this));
+
+        });
     }
 
     @Override
     public List<Column> getFullSchema(Optional<MvccSnapshot> snapshot) {
-        return IcebergUtils.withSnapshotCacheValue(snapshot, this, 
this::projectFullSchema);
+        return withMissingTableRepair(() -> {

Review Comment:
   [P2] Repair lookup state for Iceberg schema-display reads
   
   `DESC`, `SHOW COLUMNS` and `SHOW CREATE TABLE` call 
`getBaseSchemaForDisplay()`, which bypasses these `getFullSchema()` wrappers. 
Its `isView()` call finishes before the actual `withIcebergTableGeneration()` 
load, so a later missing-table exception is only rethrown. For a Hadoop Iceberg 
catalog with `meta.cache.iceberg.table.ttl-second=0`, warm `SHOW TABLES` and 
`DESC t`, drop `t` externally, then run `DESC t`: the remote load confirms 
absence while `SHOW TABLES` still lists `t`. The [Iceberg 1.11 
loader](https://github.com/apache/iceberg/blob/apache-iceberg-1.11.0/core/src/main/java/org/apache/iceberg/BaseMetastoreCatalog.java#L45-L55)
 throws `NoSuchTableException` here. Wrap the display method's table read in 
the same repair boundary while preserving its display-specific projection, and 
add command-path coverage.



##########
fe/fe-core/src/main/java/org/apache/doris/datasource/paimon/PaimonExternalTable.java:
##########
@@ -403,7 +403,10 @@ public boolean isPartitionColumnAllowNull() {
 
     @Override
     public MvccSnapshot loadSnapshot(Optional<TableSnapshot> tableSnapshot, 
Optional<TableScanParams> scanParams) {
-        return new 
PaimonMvccSnapshot(getPaimonSnapshotCacheValue(tableSnapshot, scanParams));
+        return withMissingTableRepair(() -> {

Review Comment:
   [P2] Cover the latest-fence path used by OPTIONS reads
   
   `StatementContext.loadSnapshots()` calls `loadLatestSnapshotFence()` 
directly for `t@options('scan.mode'='latest')` and other statement-snapshot 
options, so that base-table read bypasses this new wrapper. With complete FE 
names/object caches and an expired or disabled Paimon table entry (for example 
`meta.cache.paimon.table.ttl-second=0`), drop `t` externally and run `EXPLAIN 
SELECT * FROM t@options('scan.mode'='latest')`. The fence's table load throws 
`TableNotExistException` before any wrapped snapshot/schema read runs, leaving 
`t` in `SHOW TABLES` and subsequent OPTIONS lookups. Apply the repair boundary 
to `loadLatestSnapshotFence()`'s base-table read too, and cover this route in a 
regression test.



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