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


##########
fe/fe-connector/fe-connector-iceberg/src/main/java/org/apache/doris/connector/iceberg/IcebergConnectorMetadata.java:
##########
@@ -499,17 +500,24 @@ public ConnectorTableSchema getTableSchema(
                 schema = table.schema();
             }
         }
-        return buildTableSchema(iceHandle.getTableName(), table, schema, true);
+        String specId = 
snapshot.getProperties().get(PARTITION_SPEC_ID_PROPERTY);

Review Comment:
   [P1] Honor the cached schema ID on the snapshot-less arm before combining it 
with this cached spec. `beginQuerySnapshot` now emits a nonnegative schema ID 
even when `snapshotId` is -1, and the new eager latest materialization calls 
this overload. On a warm cache hit in a REST vended-credential catalog (where 
raw table caching is disabled), a schema-only ALTER of a still-empty table 
reloads the live table, but the `currentSnapshot() == null` branch above 
selects live `table.schema()`; `getColumnHandles(..., snapshot)` repeats that 
bypass. The supposedly exact S1 pin therefore binds S2 and pairs it with cached 
P1, then the same unchanged cache makes these selectors flip back to S1 after 
the first append. Please resolve any nonnegative snapshot schema ID through 
`table.schemas()` regardless of `currentSnapshot()`, keep the same missing-ID 
fallback in both schema and handle paths, and add a warm-cache schema-evolution 
test that leaves the table snapshot-less (ideally also covering the
  first-append transition).



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