-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Improve exception handling for CREATE TABLE
task
#11539
Improve exception handling for CREATE TABLE
task
#11539
Conversation
2efb5f1
to
798422e
Compare
Provide meaningful exception message for `CREATE TABLE` task when dealing with namesake table of unsupported type in shared metastore. This change affects the connectors: hive, iceberg, delta lake which may deal with a shared metastore (HMS/AWS Glue).
798422e
to
e50cbc3
Compare
@@ -129,6 +129,7 @@ | |||
MISSING_ROW_PATTERN(106, USER_ERROR), | |||
INVALID_WINDOW_MEASURE(107, USER_ERROR), | |||
STACK_OVERFLOW(108, USER_ERROR), | |||
UNSUPPORTED_TABLE_TYPE(109, USER_ERROR), |
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.
cc @electrum
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergErrorCode.java
Show resolved
Hide resolved
...t-tests/src/main/java/io/trino/tests/product/iceberg/TestIcebergHiveTablesCompatibility.java
Show resolved
Hide resolved
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.
Looks reasonable to me.
There's a bigger question along with #11617 I guess. Should connectors ever hide unsupported tables? Now that we have table redirections it seems to me like we should never filter tables, and so these create table statements should always see the existing tables rather than relying on catching it with the exception code.
@alexjo2144 good point. I would rather put this PR on hold until #11617 is cleared and then act accordingly. Calling |
|
I will assume that the label "no-release-notes" from @findepi supersedes the suggestion from @findinpath |
Provide meaningful exception message for
CREATE TABLE
taskwhen dealing with namesake table of unsupported type in
shared metastore.
This change affects the connectors: hive, iceberg, delta lake
which may deal with a shared metastore (HMS/AWS Glue).
Description
Fix
This change affects the core query engine (
CreateTableTask
)In the context of using shared metastore between Hive, Iceberg/Delta it may very well happen that the users are trying to create a namesake table from two different connectors. This PR improves exception handling in the
CREATE TABLE
task to provide a meaningful message to the user in such a situation.Related issues, pull requests, and links
Fixes #10446
Documentation
(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
( ) No release notes entries required.
(x) Release notes entries required with the following suggested text: