Skip to content

Commit

Permalink
Improve and add JavaDocs related to Materialized Views
Browse files Browse the repository at this point in the history
  • Loading branch information
Hubert Łojek authored and findepi committed May 11, 2023
1 parent 994a09a commit 09310b7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -741,16 +744,18 @@ 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)
{
return emptyList();
}

/**
* 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}.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

0 comments on commit 09310b7

Please sign in to comment.