Skip to content
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

Improve and add JavaDocs related to Materialized Views #17443

Merged
merged 1 commit into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
}