-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Disallow querying delta lake properties table #10447
Disallow querying delta lake properties table #10447
Conversation
527b7e4
to
abab02c
Compare
@@ -60,6 +63,9 @@ | |||
if (table.isEmpty()) { | |||
throw new TableNotFoundException(tableName); | |||
} | |||
if (isDeltaLakeTable(table.get())) { | |||
throw new TrinoException(HIVE_UNSUPPORTED_FORMAT, "Cannot query Delta Lake table"); |
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.
nit: would be good to mention table name in error message
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.
I modified the exception message to its original format to be in sync with the other places where the exception is being thrown.
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.
I agree with @phd3 we should provide table name in the message.
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.
Good point. I'll make a separate commit then to update everywhere the exception message.
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.
agreed, the io.trino.plugin.hive.HiveMetadata#getTableHandle
can (and should) be updated in a separate commit.
plugin/trino-hive/src/main/java/io/trino/plugin/hive/HiveMetadata.java
Outdated
Show resolved
Hide resolved
f93877c
to
0b757ba
Compare
plugin/trino-hive/src/main/java/io/trino/plugin/hive/PropertiesSystemTableProvider.java
Show resolved
Hide resolved
349c5a0
to
55da414
Compare
@@ -60,6 +63,9 @@ | |||
if (table.isEmpty()) { | |||
throw new TableNotFoundException(tableName); | |||
} | |||
if (isDeltaLakeTable(table.get())) { | |||
throw new TrinoException(HIVE_UNSUPPORTED_FORMAT, "Cannot query Delta Lake table"); |
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.
I agree with @phd3 we should provide table name in the message.
55da414
to
9c252f8
Compare
9c252f8
to
acb1779
Compare
Merged, thanks! |
Extracted relevant commits for disallowing the querying of the
$properties
table on the delta lake tables in hive from the PR #10441