github-actions[bot] commented on code in PR #69485:
URL: https://github.com/apache/doris/pull/69485#discussion_r4354683158
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergMetadataOps.java:
##########
@@ -2141,8 +2156,8 @@ private boolean viewExistsInternal(String remoteDbName,
String remoteViewName) {
}
private boolean viewExistsInternal(SessionContext ctx, String
remoteDbName, String remoteViewName) {
- return viewCatalog(ctx).map(activeCatalog ->
- activeCatalog.viewExists(getTableIdentifier(remoteDbName,
remoteViewName))).orElse(false);
+ return viewCatalog(ctx).map(activeCatalog -> probeViews(activeCatalog,
+ () ->
activeCatalog.viewExists(getTableIdentifier(remoteDbName, remoteViewName)),
false)).orElse(false);
Review Comment:
[P1] Preserve the requested drop kind before allowing the V0 fallback
With a writable JDBC V0 catalog containing an ordinary permanent table
`c.db.t`, `DROP VIEW c.db.t` now deletes and purges that table. `Env.dropView`
passes `isView=true`, but `ExternalCatalog.dropTable` discards it and invokes
`IcebergMetadataOps.dropTableImpl`. This changed probe converts V0's
`UnsupportedOperationException` to `false`, selecting `performDropTable` and
`catalog.dropTable(id, true)` instead of stopping before mutation. `DROP
TEMPORARY TABLE c.db.t` and `DROP MATERIALIZED VIEW c.db.t` also reach this
branch because the same dispatch discards `mustTemporary` and `isMtmv`; `IF
EXISTS` does not protect an existing table. Preserve or reject the requested
kind/lifetime before invoking the table mutation, and add negative tests on a
writable V0 catalog proving these statements leave ordinary table metadata and
rows intact.
--
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]