Gabriel39 commented on code in PR #69485:
URL: https://github.com/apache/doris/pull/69485#discussion_r4354913096


##########
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:
   Fixed in the latest update and synchronized to #69486.
   
   `ExternalCatalog.dropTable` now checks the requested object kind and 
temporary-table lifetime before calling the legacy metadata API. `DROP 
VIEW`/`DROP MATERIALIZED VIEW` cannot delete an existing table, including with 
`IF EXISTS`. `DROP TEMPORARY TABLE IF EXISTS` returns without mutation, while 
the non-`IF EXISTS` form reports an unknown table. Reverse table/view 
mismatches are rejected; matching table and view drops remain supported.
   
   Added eight dispatch tests using the real SDK V0 view guards and a recording 
writable JDBC catalog. They check table state/rows, purge calls, and delete 
journaling; five tests failed before the fix and all eight now pass on both 
branches. Added the six PostgreSQL SQL forms with table-list/data checks after 
each statement.
   
   Local validation: 29 targeted unit tests pass on branch-4.2 and 27 on 
branch-4.1, with zero failures/errors/skips; FE Checkstyle passes on both. 
Regression Groovy syntax was checked; release-branch end-to-end SQL was not run 
locally. Both PRs have fresh `run buildall` and `/review` triggers.



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