github-actions[bot] commented on code in PR #69299:
URL: https://github.com/apache/doris/pull/69299#discussion_r4321436027
##########
fe/fe-connector/fe-connector-iceberg/src/main/java/org/apache/doris/connector/iceberg/IcebergConnectorMetadata.java:
##########
@@ -424,26 +438,56 @@ private String loadTableComment(ConnectorSession session,
String dbName, String
@Override
public Optional<ConnectorTableHandle> getTableHandle(
ConnectorSession session, String dbName, String tableName) {
+ IcebergTableHandle handle = new IcebergTableHandle(dbName, tableName);
+ if (IcebergStatementScope.hasReadTable(session, dbName, tableName)
+ || (tableCache != null &&
tableCache.contains(TableIdentifier.of(dbName, tableName)))) {
Review Comment:
[P2] Preserve live existence checks for DROP TABLE IF EXISTS
With an HMS Iceberg catalog, read `db.t`, drop it externally, then run `DROP
TABLE IF EXISTS db.t` in Doris before the read-table cache expires. This
shortcut returns a handle from the stale cache, so
`PluginDrivenExternalCatalog.dropTable` skips its absent-handle `IF EXISTS`
cleanup. `IcebergConnectorMetadata.dropTable` then calls the HMS-only
`loadTableLocation`, which performs a live `catalog.loadTable` and throws
`NoSuchTableException`; that becomes a `DdlException` despite `IF EXISTS`, and
cleanup/invalidation is never reached. Previously `getTableHandle` called
`catalogOps.tableExists` and took the no-op cleanup branch. Preserve an
authoritative DDL existence check or handle the missing-table outcome according
to `IF EXISTS`.
--
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]