diff --git a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMetadata.java b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMetadata.java index 4097c234a45a..df3871c516e8 100644 --- a/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMetadata.java +++ b/core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMetadata.java @@ -269,6 +269,9 @@ default Optional<Object> getInfo(ConnectorTableHandle table) /** * List table, view and materialized view names, possibly filtered by schema. An empty list is returned if none match. * An empty list is returned also when schema name does not refer to an existing schema. + * + * @see #listViews(ConnectorSession, Optional) + * @see #listMaterializedViews(ConnectorSession, Optional) */ default List<SchemaTableName> listTables(ConnectorSession session, Optional<String> schemaName) { @@ -741,8 +744,10 @@ default void dropView(ConnectorSession session, SchemaTableName viewName) } /** - * List view names, possibly filtered by schema. An empty list is returned if none match. + * List view names (but not materialized views), possibly filtered by schema. An empty list is returned if none match. * An empty list is returned also when schema name does not refer to an existing schema. + * + * @see #listMaterializedViews(ConnectorSession, Optional) */ default List<SchemaTableName> listViews(ConnectorSession session, Optional<String> schemaName) { @@ -750,7 +755,7 @@ default List<SchemaTableName> listViews(ConnectorSession session, Optional<Strin } /** - * Gets the definitions of views, possibly filtered by schema. + * Gets the definitions of views (but not materialized views), possibly filtered by schema. * This optional method may be implemented by connectors that can support fetching * view data in bulk. It is used to implement {@code information_schema.views}. */ diff --git a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/TableType.java b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/TableType.java index a23f65df7b67..8e7b8bab553b 100644 --- a/plugin/trino-hive/src/main/java/io/trino/plugin/hive/TableType.java +++ b/plugin/trino-hive/src/main/java/io/trino/plugin/hive/TableType.java @@ -18,5 +18,8 @@ public enum TableType MANAGED_TABLE, EXTERNAL_TABLE, VIRTUAL_VIEW, + /** + * A table type denoting materialized view created by Hive, not by Trino. + */ MATERIALIZED_VIEW, }