-
Notifications
You must be signed in to change notification settings - Fork 593
[#1237] fix(trino): Fix dropping iceberg schema failure #1239
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
Conversation
} catch (NonEmptySchemaException e) { | ||
throw new TrinoException(GRAVITINO_SCHEMA_NOT_EMPTY, "Schema does not empty", e); | ||
} catch (Exception e) { | ||
String errorMessage = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to report an error here that the array is out of bounds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Clearvive ,
I can't get your meaning clearly, could you provide more details about it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a common practice, and I'll refine it later. I have created the issue #1249
@Clearvive can you please help to review. |
api/src/main/java/com/datastrato/gravitino/rel/SupportsSchemas.java
Outdated
Show resolved
Hide resolved
api/src/main/java/com/datastrato/gravitino/rel/SupportsSchemas.java
Outdated
Show resolved
Hide resolved
All unnecessary changes have been undo, please take a look again. |
This reverts commit e359931.
@@ -379,24 +379,15 @@ public Schema alterSchema(NameIdentifier ident, SchemaChange... changes) | |||
@Override | |||
public boolean dropSchema(NameIdentifier ident, boolean cascade) throws NonEmptySchemaException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it only throw the NonEmptySchemaException?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other exceptions will also be thrown, but it's not explicitly declared.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
...ion-test/src/test/java/com/datastrato/gravitino/integration/test/trino/TrinoConnectorIT.java
Outdated
Show resolved
Hide resolved
API related changes have been reverted. |
### 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.