-
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
Hide Delta Lake tables #5430
Hide Delta Lake tables #5430
Conversation
fbcaf82
to
0d1d1f4
Compare
presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/file/FileHiveMetastoreConfig.java
Outdated
Show resolved
Hide resolved
presto-hive-hadoop2/src/test/java/io/prestosql/plugin/hive/TestHive.java
Show resolved
Hide resolved
presto-hive/src/main/java/io/prestosql/plugin/hive/HiveConfig.java
Outdated
Show resolved
Hide resolved
presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/alluxio/AlluxioHiveMetastore.java
Outdated
Show resolved
Hide resolved
.map(Path::getName) | ||
return listAllTables(databaseName).stream() | ||
.filter(hideDeltaLakeTables | ||
? Predicate.not(ImmutableSet.copyOf(getTablesWithParameter(databaseName, SPARK_TABLE_PROVIDER_KEY, DELTA_LAKE_PROVIDER))::contains) |
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.
static import.
Though I personally would prefer not using Predicate.not
at all and just extend the lambda, and use !
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.
static import what?
Though I personally would prefer not using Predicate.not at all and just extend the lambda, and use !
the not
is necessary to make ImmutableSet.copyOf(....)
computed once
We need to document this property. Maybe even a separate section about Delta tables somewhere. |
I'll move the config property from HiveConfig to MetastoreConfig to please iceberg. |
0d1d1f4
to
7f4e4ba
Compare
presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/file/FileHiveMetastoreConfig.java
Outdated
Show resolved
Hide resolved
presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/file/FileMetastoreModule.java
Outdated
Show resolved
Hide resolved
presto-hive-hadoop2/src/test/java/io/prestosql/plugin/hive/TestHiveAlluxioMetastore.java
Show resolved
Hide resolved
presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/file/FileHiveMetastore.java
Show resolved
Hide resolved
presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/file/FileHiveMetastore.java
Show resolved
Hide resolved
presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/glue/GlueHiveMetastore.java
Outdated
Show resolved
Hide resolved
presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/thrift/ThriftHiveMetastore.java
Outdated
Show resolved
Hide resolved
presto-hive/src/main/java/io/prestosql/plugin/hive/HiveTableProperties.java
Outdated
Show resolved
Hide resolved
7f4e4ba
to
de9c3c4
Compare
f30fbe4
to
8799cbb
Compare
AC |
presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/file/FileHiveMetastore.java
Show resolved
Hide resolved
presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/file/FileHiveMetastore.java
Show resolved
Hide resolved
8799cbb
to
888d56b
Compare
AC |
} | ||
return ImmutableList.of(tableName); | ||
return optionalTable |
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 could be done inline, no need for the variable
return metastore.getTable(...)
.filter(...)
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 wanted the catch(HiveViewNotSupportedException
to cover as little as required
return hideDeltaLakeTables; | ||
} | ||
|
||
@Config("hive.hide-delta-tables") |
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.
Let's be explicit and call this hive.hide-delta-lake-tables
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 catch
888d56b
to
a5b43ba
Compare
AC |
I was hoping the config would generic like |
@dain Cool idea! There are currently many unsupported table types (eg HBase, JdbcStorageHandler), and having a generic-looking config, which -- as it stands today -- filters out Delta Lake tables only would not be easy to understand. Still, we can easily rename the config when we expand the functionality. Would you mind filing an issue for that? |
Hive connector cannot read from Delta Lake tables and some users prefer not to see such tables at all.
a5b43ba
to
1f4681b
Compare
@mosabua can you please follow up with docs? |
@findepi - Can Iceberg tables be hidden from Hive connector as well? |
@dmitryfill good idea! also, please be aware there is some work to allow a redirect from hive to iceberg, see #4704 |
Hive connector cannot read from Delta Lake tables and some users prefer
not to see such tables at all.