slfan1989 opened a new issue, #1337:
URL: https://github.com/apache/paimon-rust/issues/1337

   ### Search before asking
   
   - [x] I searched in the 
[issues](https://github.com/apache/paimon-rust/issues) and found nothing 
similar.
   
   
   ### Please describe the bug 🐞
   
   ### Describe the bug
   
   When a single `DROP TABLE` statement targets multiple Paimon catalogs, 
Paimon uses the first target's catalog for every deletion. This can delete an 
unrelated table with the same name.
   
   ### Reproduction
   
   Register `cat1` and `cat2` as Paimon catalogs backed by separate warehouses, 
then run:
   
   ```sql
   CREATE TABLE cat1.default.a (id INT);
   CREATE TABLE cat1.default.b (id INT);
   CREATE TABLE cat2.default.b (id INT);
   
   DROP TABLE cat1.default.a, cat2.default.b;
   ```
   
   **Actual:** 
   
   The statement succeeds. It deletes `cat1.default.a` and `cat1.default.b`. 
`cat2.default.b` still exists.
   
   **Expected:** 
   
   The statement deletes `cat1.default.a` and `cat2.default.b`, leaving 
`cat1.default.b` intact.
   
   
   
   ### Solution
   
   Resolve every target's catalog and table identifier before deleting any 
tables, then execute each deletion against its own catalog.
   
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!


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

Reply via email to