-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug report] Dropping an Iceberg schema is misunderstanding #1237
Comments
The root cause: |
So I think you should determine this based on the return value. |
We are unable to determine the outcome based solely on the return value. For example. A false return value may indicate
So, if we need to determine the cause, I think we should change the return type of the method. A simple boolean type cannot meet our needs. Do you mean to change the return type to determine this based on the return value? |
We don't need to determine the cause. A typical |
I'm curious why do you need to know the failure reason, from Trino side, "false" means the drop operation is failed, the schema still exists. Only "true" means drop operation is successful, otherwise it will be false no matter what reason it is. From Trino side, using the return value should be enough. Unless one scenario that the return value is "true" but schema exists, that is an unexpected scenario we should fix. |
True or false is sufficient for Trino program logic, but not for users. Users who use the drop operation failed, but without any information about why it failed, they may be confused and unsure of what to do. Users should be aware of the primary cause. Besides, I see other interfaces like |
### What changes were proposed in this pull request? Instead of catching exceptions when dropping schemas fails, throw them. ### Why are the changes needed? We can't determine whether the schema drop was successful or not based on its return value. Fix: #1237 ### Does this PR introduce _any_ user-facing change? N/A ### How was this patch tested? Existing UTs and ITs.
### What changes were proposed in this pull request? Instead of catching exceptions when dropping schemas fails, throw them. ### Why are the changes needed? We can't determine whether the schema drop was successful or not based on its return value. Fix: #1237 ### Does this PR introduce _any_ user-facing change? N/A ### How was this patch tested? Existing UTs and ITs.
### What changes were proposed in this pull request? Instead of catching exceptions when dropping schemas fails, throw them. ### Why are the changes needed? We can't determine whether the schema drop was successful or not based on its return value. Fix: #1237 ### Does this PR introduce _any_ user-facing change? N/A ### How was this patch tested? Existing UTs and ITs. Co-authored-by: Qi Yu <[email protected]>
Describe what's wrong
Error message and/or stacktrace
How to reproduce
Execute
drop schema db1 CASCADE
to drop Iceberg schema.Additional context
No response
The text was updated successfully, but these errors were encountered: