-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Avoid including hive views in iceberg SHOW TABLES #8153
Conversation
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
Please add a test exercising Hive and Iceberg using same backing metastore.
This should be a product test to get good coverage of metastore-dependent interactions like this. (For example -- can getTablesWithParameter
be used with TABLE_COMMENT property?)
plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergMetadataListing.java
Outdated
Show resolved
Hide resolved
Thanks for pointing out, turns out TABLE_PARAMETER_SAFE_VALUE_PATTERN blocks our parameter value, i'll need to tweak that a bit |
Your value is not far from matching based on the code comment:
seems like we could allow spaces in |
d5fa3d3
to
ef254e6
Compare
I got things working for iceberg by allowing spaces in TABLE_PARAMETER_SAFE_VALUE_PATTERN. |
ef254e6
to
713ac24
Compare
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!
} | ||
|
||
@Test | ||
public void testTableColumnListing() | ||
{ | ||
// Verify information_schema.columns does not include columns from non-Iceberg tables | ||
assertQuery("SELECT table_name, column_name FROM iceberg.information_schema.columns WHERE table_schema = 'test_schema'", | ||
"VALUES ('iceberg_table1', '_string'), ('iceberg_table1', '_integer'), ('iceberg_table2', '_double')"); | ||
// TODO this should include columns from the materialized view as well |
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.
please create an issue in Github and reference it here
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 should get solved by #8113
...oduct-tests/src/main/java/io/trino/tests/product/iceberg/TestIcebergHiveMetadataListing.java
Outdated
Show resolved
Hide resolved
...oduct-tests/src/main/java/io/trino/tests/product/iceberg/TestIcebergHiveMetadataListing.java
Outdated
Show resolved
Hide resolved
onTrino().executeQuery("CREATE TABLE iceberg.default.iceberg_table1 (_string VARCHAR, _integer INTEGER)"); | ||
onTrino().executeQuery("CREATE MATERIALIZED VIEW iceberg.default.iceberg_materialized_view AS " + | ||
"SELECT * FROM iceberg.default.iceberg_table1"); | ||
storageTable = getOnlyElement(onTrino().executeQuery("SHOW TABLES FROM iceberg.default") |
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 storage table created immediately?
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.
yes, in iceberg CREATE MV we create the storage table even before storing the MV definition in HMS
713ac24
to
3531676
Compare
No description provided.