Constructor and Description |
---|
MetadataManager(FunctionAndTypeManager functionAndTypeManager,
BlockEncodingSerde blockEncodingSerde,
SessionPropertyManager sessionPropertyManager,
SchemaPropertyManager schemaPropertyManager,
TablePropertyManager tablePropertyManager,
ColumnPropertyManager columnPropertyManager,
AnalyzePropertyManager analyzePropertyManager,
TransactionManager transactionManager) |
MetadataManager(com.facebook.airlift.json.JsonCodec<ViewDefinition> viewCodec,
BlockEncodingSerde blockEncodingSerde,
SessionPropertyManager sessionPropertyManager,
SchemaPropertyManager schemaPropertyManager,
TablePropertyManager tablePropertyManager,
ColumnPropertyManager columnPropertyManager,
AnalyzePropertyManager analyzePropertyManager,
TransactionManager transactionManager,
FunctionAndTypeManager functionAndTypeManager) |
Modifier and Type | Method and Description |
---|---|
void |
addColumn(Session session,
TableHandle tableHandle,
ColumnMetadata column)
Add the specified column to the table.
|
OutputTableHandle |
beginCreateTable(Session session,
String catalogName,
ConnectorTableMetadata tableMetadata,
Optional<NewTableLayout> layout)
Begin the atomic creation of a table with data.
|
TableHandle |
beginDelete(Session session,
TableHandle tableHandle)
Begin delete query
|
InsertTableHandle |
beginInsert(Session session,
TableHandle tableHandle)
Begin insert query
|
void |
beginQuery(Session session,
Set<ConnectorId> connectors)
Start a SELECT/UPDATE/INSERT/DELETE query
|
InsertTableHandle |
beginRefreshMaterializedView(Session session,
TableHandle tableHandle)
Begin refresh materialized view
|
AnalyzeTableHandle |
beginStatisticsCollection(Session session,
TableHandle tableHandle)
Begin statistics collection
|
boolean |
catalogExists(Session session,
String catalogName) |
void |
cleanupQuery(Session session)
Cleanup after a query.
|
com.google.common.util.concurrent.ListenableFuture<Void> |
commitPageSinkAsync(Session session,
InsertTableHandle tableHandle,
Collection<io.airlift.slice.Slice> fragments)
Commits page sink for table insertion.
|
com.google.common.util.concurrent.ListenableFuture<Void> |
commitPageSinkAsync(Session session,
OutputTableHandle tableHandle,
Collection<io.airlift.slice.Slice> fragments)
Commits page sink for table creation.
|
static com.google.common.base.Function<SchemaTableName,QualifiedObjectName> |
convertFromSchemaTableName(String catalogName) |
void |
createMaterializedView(Session session,
String catalogName,
ConnectorTableMetadata viewMetadata,
ConnectorMaterializedViewDefinition viewDefinition,
boolean ignoreExisting)
Creates the specified materialized view with the specified view definition.
|
void |
createRole(Session session,
String role,
Optional<PrestoPrincipal> grantor,
String catalog)
Creates the specified role in the specified catalog.
|
void |
createSchema(Session session,
CatalogSchemaName schema,
Map<String,Object> properties)
Creates a schema.
|
void |
createTable(Session session,
String catalogName,
ConnectorTableMetadata tableMetadata,
boolean ignoreExisting)
Creates a table using the specified table metadata.
|
TableHandle |
createTemporaryTable(Session session,
String catalogName,
List<ColumnMetadata> columns,
Optional<PartitioningMetadata> partitioningMetadata)
Creates a temporary table with optional partitioning requirements.
|
static MetadataManager |
createTestMetadataManager() |
static MetadataManager |
createTestMetadataManager(CatalogManager catalogManager) |
static MetadataManager |
createTestMetadataManager(CatalogManager catalogManager,
FeaturesConfig featuresConfig) |
static MetadataManager |
createTestMetadataManager(FeaturesConfig featuresConfig) |
static MetadataManager |
createTestMetadataManager(TransactionManager transactionManager,
FeaturesConfig featuresConfig) |
void |
createView(Session session,
String catalogName,
ConnectorTableMetadata viewMetadata,
String viewData,
boolean replace)
Creates the specified view with the specified view definition.
|
void |
dropColumn(Session session,
TableHandle tableHandle,
ColumnHandle column)
Drop the specified column.
|
void |
dropMaterializedView(Session session,
QualifiedObjectName viewName)
Drops the specified materialized view.
|
void |
dropRole(Session session,
String role,
String catalog)
Drops the specified role in the specified catalog.
|
void |
dropSchema(Session session,
CatalogSchemaName schema)
Drops the specified schema.
|
void |
dropTable(Session session,
TableHandle tableHandle)
Drops the specified table
|
void |
dropView(Session session,
QualifiedObjectName viewName)
Drops the specified view.
|
Optional<ConnectorOutputMetadata> |
finishCreateTable(Session session,
OutputTableHandle tableHandle,
Collection<io.airlift.slice.Slice> fragments,
Collection<ComputedStatistics> computedStatistics)
Finish a table creation with data after the data is written.
|
void |
finishDelete(Session session,
TableHandle tableHandle,
Collection<io.airlift.slice.Slice> fragments)
Finish delete query
|
Optional<ConnectorOutputMetadata> |
finishInsert(Session session,
InsertTableHandle tableHandle,
Collection<io.airlift.slice.Slice> fragments,
Collection<ComputedStatistics> computedStatistics)
Finish insert query
|
Optional<ConnectorOutputMetadata> |
finishRefreshMaterializedView(Session session,
InsertTableHandle tableHandle,
Collection<io.airlift.slice.Slice> fragments,
Collection<ComputedStatistics> computedStatistics)
Finish refresh materialized view
|
void |
finishStatisticsCollection(Session session,
AnalyzeTableHandle tableHandle,
Collection<ComputedStatistics> computedStatistics)
Finish statistics collection
|
TableHandle |
getAlternativeTableHandle(Session session,
TableHandle tableHandle,
PartitioningHandle partitioningHandle)
Return a table handle whose partitioning is converted to the provided partitioning handle,
but otherwise identical to the provided table layout handle.
|
AnalyzePropertyManager |
getAnalyzePropertyManager() |
BlockEncodingSerde |
getBlockEncodingSerde() |
Optional<ConnectorId> |
getCatalogHandle(Session session,
String catalogName)
Returns a connector id for the specified catalog name.
|
Map<String,ConnectorId> |
getCatalogNames(Session session)
Gets all the loaded catalogs
|
Map<String,Collection<ConnectorMetadata>> |
getCatalogsByQueryId() |
Map<String,ColumnHandle> |
getColumnHandles(Session session,
TableHandle tableHandle)
Gets all of the columns on the specified table, or an empty map if the columns can not be enumerated.
|
ColumnMetadata |
getColumnMetadata(Session session,
TableHandle tableHandle,
ColumnHandle columnHandle)
Gets the metadata for the specified table column.
|
ColumnPropertyManager |
getColumnPropertyManager() |
Optional<PartitioningHandle> |
getCommonPartitioning(Session session,
PartitioningHandle left,
PartitioningHandle right)
Return a partitioning handle which the connector can transparently convert both
left and right into. |
Set<ConnectorCapabilities> |
getConnectorCapabilities(Session session,
ConnectorId connectorId) |
FunctionAndTypeManager |
getFunctionAndTypeManager() |
Optional<Object> |
getInfo(Session session,
TableHandle handle) |
Optional<NewTableLayout> |
getInsertLayout(Session session,
TableHandle table) |
TableLayout |
getLayout(Session session,
TableHandle handle)
Returns table's layout properties for a given table handle.
|
TableLayoutResult |
getLayout(Session session,
TableHandle table,
Constraint<ColumnHandle> constraint,
Optional<Set<ColumnHandle>> desiredColumns)
Returns a new table layout that satisfies the given constraint together with unenforced constraint.
|
Optional<ConnectorMaterializedViewDefinition> |
getMaterializedView(Session session,
QualifiedObjectName viewName)
Returns the materialized view definition for the specified materialized view name.
|
MaterializedViewStatus |
getMaterializedViewStatus(Session session,
QualifiedObjectName materializedViewName)
Get Materialized view status
|
MetadataUpdates |
getMetadataUpdateResults(Session session,
QueryManager queryManager,
MetadataUpdates metadataUpdateRequests,
QueryId queryId) |
Optional<NewTableLayout> |
getNewTableLayout(Session session,
String catalogName,
ConnectorTableMetadata tableMetadata) |
PartitioningHandle |
getPartitioningHandleForExchange(Session session,
String catalogName,
int partitionCount,
List<Type> partitionTypes)
Provides partitioning handle for exchange.
|
Optional<NewTableLayout> |
getPreferredShuffleLayoutForInsert(Session session,
TableHandle table) |
Optional<NewTableLayout> |
getPreferredShuffleLayoutForNewTable(Session session,
String catalogName,
ConnectorTableMetadata tableMetadata) |
ProcedureRegistry |
getProcedureRegistry() |
List<QualifiedObjectName> |
getReferencedMaterializedViews(Session session,
QualifiedObjectName tableName)
Gets the referenced materialized views for a give table
|
SchemaPropertyManager |
getSchemaPropertyManager() |
SessionPropertyManager |
getSessionPropertyManager() |
TableStatisticsMetadata |
getStatisticsCollectionMetadata(Session session,
String catalogName,
ConnectorTableMetadata tableMetadata)
Describe statistics that must be collected during a statistics collection
|
TableStatisticsMetadata |
getStatisticsCollectionMetadataForWrite(Session session,
String catalogName,
ConnectorTableMetadata tableMetadata)
Describes statistics that must be collected during a write.
|
Optional<SystemTable> |
getSystemTable(Session session,
QualifiedObjectName tableName) |
Optional<TableHandle> |
getTableHandle(Session session,
QualifiedObjectName table)
Returns a table handle for the specified table name.
|
Optional<TableHandle> |
getTableHandleForStatisticsCollection(Session session,
QualifiedObjectName table,
Map<String,Object> analyzeProperties) |
TableLayoutFilterCoverage |
getTableLayoutFilterCoverage(Session session,
TableHandle tableHandle,
Set<String> relevantPartitionColumns)
Check if there is filter coverage of the specified partitioning keys
|
TableMetadata |
getTableMetadata(Session session,
TableHandle tableHandle)
Return the metadata for the specified table handle.
|
TablePropertyManager |
getTablePropertyManager() |
TableStatistics |
getTableStatistics(Session session,
TableHandle tableHandle,
List<ColumnHandle> columnHandles,
Constraint<ColumnHandle> constraint)
Return statistics for specified table for given columns and filtering constraint.
|
Type |
getType(TypeSignature signature) |
ColumnHandle |
getUpdateRowIdColumnHandle(Session session,
TableHandle tableHandle)
Get the row ID column handle used with UpdatablePageSource.
|
Optional<ViewDefinition> |
getView(Session session,
QualifiedObjectName viewName)
Returns the view definition for the specified view name.
|
Map<QualifiedObjectName,ViewDefinition> |
getViews(Session session,
QualifiedTablePrefix prefix)
Get the view definitions that match the specified table prefix (never null).
|
void |
grantRoles(Session session,
Set<String> roles,
Set<PrestoPrincipal> grantees,
boolean withAdminOption,
Optional<PrestoPrincipal> grantor,
String catalog)
Grants the specified roles to the specified grantees in the specified catalog
|
void |
grantTablePrivileges(Session session,
QualifiedObjectName tableName,
Set<Privilege> privileges,
PrestoPrincipal grantee,
boolean grantOption)
Grants the specified privilege to the specified user on the specified table
|
boolean |
isLegacyGetLayoutSupported(Session session,
TableHandle tableHandle)
Experimental: if true, the engine will invoke getLayout otherwise, getLayout will not be called.
|
boolean |
isRefinedPartitioningOver(Session session,
PartitioningHandle left,
PartitioningHandle right)
Return whether
left is a refined partitioning over right . |
Set<RoleGrant> |
listApplicableRoles(Session session,
PrestoPrincipal principal,
String catalog)
List applicable roles, including the transitive grants, for the specified principal
|
Set<String> |
listEnabledRoles(Session session,
String catalog)
List applicable roles, including the transitive grants, in given session
|
Set<RoleGrant> |
listRoleGrants(Session session,
String catalog,
PrestoPrincipal principal)
List roles grants in the specified catalog for a given principal, not recursively.
|
Set<String> |
listRoles(Session session,
String catalog)
List available roles in specified catalog.
|
List<String> |
listSchemaNames(Session session,
String catalogName) |
Map<QualifiedObjectName,List<ColumnMetadata>> |
listTableColumns(Session session,
QualifiedTablePrefix prefix)
Gets the metadata for all columns that match the specified table prefix.
|
List<GrantInfo> |
listTablePrivileges(Session session,
QualifiedTablePrefix prefix)
Gets the privileges for the specified table available to the given grantee considering the selected session role
|
List<QualifiedObjectName> |
listTables(Session session,
QualifiedTablePrefix prefix)
Get the names that match the specified table prefix (never null).
|
List<QualifiedObjectName> |
listViews(Session session,
QualifiedTablePrefix prefix)
Get the names that match the specified table prefix (never null).
|
OptionalLong |
metadataDelete(Session session,
TableHandle tableHandle)
Delete the provide table layout
|
void |
registerBuiltInFunctions(List<? extends SqlFunction> functionInfos) |
void |
renameColumn(Session session,
TableHandle tableHandle,
ColumnHandle source,
String target)
Rename the specified column.
|
void |
renameSchema(Session session,
CatalogSchemaName source,
String target)
Renames the specified schema.
|
void |
renameTable(Session session,
TableHandle tableHandle,
QualifiedObjectName newTableName)
Rename the specified table.
|
Optional<ResolvedIndex> |
resolveIndex(Session session,
TableHandle tableHandle,
Set<ColumnHandle> indexableColumns,
Set<ColumnHandle> outputColumns,
TupleDomain<ColumnHandle> tupleDomain)
Try to locate a table index that can lookup results by indexableColumns and provide the requested outputColumns.
|
void |
revokeRoles(Session session,
Set<String> roles,
Set<PrestoPrincipal> grantees,
boolean adminOptionFor,
Optional<PrestoPrincipal> grantor,
String catalog)
Revokes the specified roles from the specified grantees in the specified catalog
|
void |
revokeTablePrivileges(Session session,
QualifiedObjectName tableName,
Set<Privilege> privileges,
PrestoPrincipal grantee,
boolean grantOption)
Revokes the specified privilege on the specified table from the specified user
|
boolean |
schemaExists(Session session,
CatalogSchemaName schema) |
boolean |
supportsMetadataDelete(Session session,
TableHandle tableHandle) |
TupleDomain<ColumnHandle> |
toExplainIOConstraints(Session session,
TableHandle tableHandle,
TupleDomain<ColumnHandle> constraints)
Returns a TupleDomain of constraints that is suitable for ExplainIO
|
void |
verifyComparableOrderableContract() |
public MetadataManager(FunctionAndTypeManager functionAndTypeManager, BlockEncodingSerde blockEncodingSerde, SessionPropertyManager sessionPropertyManager, SchemaPropertyManager schemaPropertyManager, TablePropertyManager tablePropertyManager, ColumnPropertyManager columnPropertyManager, AnalyzePropertyManager analyzePropertyManager, TransactionManager transactionManager)
@Inject public MetadataManager(com.facebook.airlift.json.JsonCodec<ViewDefinition> viewCodec, BlockEncodingSerde blockEncodingSerde, SessionPropertyManager sessionPropertyManager, SchemaPropertyManager schemaPropertyManager, TablePropertyManager tablePropertyManager, ColumnPropertyManager columnPropertyManager, AnalyzePropertyManager analyzePropertyManager, TransactionManager transactionManager, FunctionAndTypeManager functionAndTypeManager)
public static MetadataManager createTestMetadataManager()
public static MetadataManager createTestMetadataManager(FeaturesConfig featuresConfig)
public static MetadataManager createTestMetadataManager(CatalogManager catalogManager)
public static MetadataManager createTestMetadataManager(CatalogManager catalogManager, FeaturesConfig featuresConfig)
public static MetadataManager createTestMetadataManager(TransactionManager transactionManager, FeaturesConfig featuresConfig)
public final void verifyComparableOrderableContract()
verifyComparableOrderableContract
in interface Metadata
public Type getType(TypeSignature signature)
public void registerBuiltInFunctions(List<? extends SqlFunction> functionInfos)
registerBuiltInFunctions
in interface Metadata
public boolean schemaExists(Session session, CatalogSchemaName schema)
schemaExists
in interface Metadata
public boolean catalogExists(Session session, String catalogName)
catalogExists
in interface Metadata
public List<String> listSchemaNames(Session session, String catalogName)
listSchemaNames
in interface Metadata
public Optional<TableHandle> getTableHandle(Session session, QualifiedObjectName table)
Metadata
getTableHandle
in interface Metadata
public Optional<TableHandle> getTableHandleForStatisticsCollection(Session session, QualifiedObjectName table, Map<String,Object> analyzeProperties)
getTableHandleForStatisticsCollection
in interface Metadata
public Optional<SystemTable> getSystemTable(Session session, QualifiedObjectName tableName)
getSystemTable
in interface Metadata
public TableLayoutResult getLayout(Session session, TableHandle table, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns)
Metadata
public TableLayout getLayout(Session session, TableHandle handle)
Metadata
public TableHandle getAlternativeTableHandle(Session session, TableHandle tableHandle, PartitioningHandle partitioningHandle)
Metadata
Metadata.getCommonPartitioning(com.facebook.presto.Session, com.facebook.presto.sql.planner.PartitioningHandle, com.facebook.presto.sql.planner.PartitioningHandle)
.getAlternativeTableHandle
in interface Metadata
public boolean isLegacyGetLayoutSupported(Session session, TableHandle tableHandle)
Metadata
isLegacyGetLayoutSupported
in interface Metadata
public Optional<PartitioningHandle> getCommonPartitioning(Session session, PartitioningHandle left, PartitioningHandle right)
Metadata
left
and right
into.getCommonPartitioning
in interface Metadata
public boolean isRefinedPartitioningOver(Session session, PartitioningHandle left, PartitioningHandle right)
Metadata
left
is a refined partitioning over right
.
See
ConnectorMetadata.isRefinedPartitioningOver(ConnectorSession, ConnectorPartitioningHandle, ConnectorPartitioningHandle)
for details about refined partitioning.
Refined-over relation is reflexive.
isRefinedPartitioningOver
in interface Metadata
public PartitioningHandle getPartitioningHandleForExchange(Session session, String catalogName, int partitionCount, List<Type> partitionTypes)
Metadata
getPartitioningHandleForExchange
in interface Metadata
public Optional<Object> getInfo(Session session, TableHandle handle)
public TableMetadata getTableMetadata(Session session, TableHandle tableHandle)
Metadata
getTableMetadata
in interface Metadata
public TableStatistics getTableStatistics(Session session, TableHandle tableHandle, List<ColumnHandle> columnHandles, Constraint<ColumnHandle> constraint)
Metadata
getTableStatistics
in interface Metadata
public Map<String,ColumnHandle> getColumnHandles(Session session, TableHandle tableHandle)
Metadata
getColumnHandles
in interface Metadata
public ColumnMetadata getColumnMetadata(Session session, TableHandle tableHandle, ColumnHandle columnHandle)
Metadata
getColumnMetadata
in interface Metadata
public TupleDomain<ColumnHandle> toExplainIOConstraints(Session session, TableHandle tableHandle, TupleDomain<ColumnHandle> constraints)
Metadata
toExplainIOConstraints
in interface Metadata
public List<QualifiedObjectName> listTables(Session session, QualifiedTablePrefix prefix)
Metadata
listTables
in interface Metadata
public Map<QualifiedObjectName,List<ColumnMetadata>> listTableColumns(Session session, QualifiedTablePrefix prefix)
Metadata
listTableColumns
in interface Metadata
public void createSchema(Session session, CatalogSchemaName schema, Map<String,Object> properties)
Metadata
createSchema
in interface Metadata
public void dropSchema(Session session, CatalogSchemaName schema)
Metadata
dropSchema
in interface Metadata
public void renameSchema(Session session, CatalogSchemaName source, String target)
Metadata
renameSchema
in interface Metadata
public void createTable(Session session, String catalogName, ConnectorTableMetadata tableMetadata, boolean ignoreExisting)
Metadata
createTable
in interface Metadata
public TableHandle createTemporaryTable(Session session, String catalogName, List<ColumnMetadata> columns, Optional<PartitioningMetadata> partitioningMetadata)
Metadata
createTemporaryTable
in interface Metadata
public void renameTable(Session session, TableHandle tableHandle, QualifiedObjectName newTableName)
Metadata
renameTable
in interface Metadata
public void renameColumn(Session session, TableHandle tableHandle, ColumnHandle source, String target)
Metadata
renameColumn
in interface Metadata
public void addColumn(Session session, TableHandle tableHandle, ColumnMetadata column)
Metadata
public void dropColumn(Session session, TableHandle tableHandle, ColumnHandle column)
Metadata
dropColumn
in interface Metadata
public void dropTable(Session session, TableHandle tableHandle)
Metadata
public Optional<NewTableLayout> getInsertLayout(Session session, TableHandle table)
getInsertLayout
in interface Metadata
public Optional<NewTableLayout> getPreferredShuffleLayoutForInsert(Session session, TableHandle table)
getPreferredShuffleLayoutForInsert
in interface Metadata
public TableStatisticsMetadata getStatisticsCollectionMetadataForWrite(Session session, String catalogName, ConnectorTableMetadata tableMetadata)
Metadata
getStatisticsCollectionMetadataForWrite
in interface Metadata
public TableStatisticsMetadata getStatisticsCollectionMetadata(Session session, String catalogName, ConnectorTableMetadata tableMetadata)
Metadata
getStatisticsCollectionMetadata
in interface Metadata
public AnalyzeTableHandle beginStatisticsCollection(Session session, TableHandle tableHandle)
Metadata
beginStatisticsCollection
in interface Metadata
public void finishStatisticsCollection(Session session, AnalyzeTableHandle tableHandle, Collection<ComputedStatistics> computedStatistics)
Metadata
finishStatisticsCollection
in interface Metadata
public Optional<NewTableLayout> getNewTableLayout(Session session, String catalogName, ConnectorTableMetadata tableMetadata)
getNewTableLayout
in interface Metadata
public Optional<NewTableLayout> getPreferredShuffleLayoutForNewTable(Session session, String catalogName, ConnectorTableMetadata tableMetadata)
getPreferredShuffleLayoutForNewTable
in interface Metadata
public void beginQuery(Session session, Set<ConnectorId> connectors)
Metadata
beginQuery
in interface Metadata
public void cleanupQuery(Session session)
Metadata
cleanupQuery
in interface Metadata
public OutputTableHandle beginCreateTable(Session session, String catalogName, ConnectorTableMetadata tableMetadata, Optional<NewTableLayout> layout)
Metadata
beginCreateTable
in interface Metadata
public Optional<ConnectorOutputMetadata> finishCreateTable(Session session, OutputTableHandle tableHandle, Collection<io.airlift.slice.Slice> fragments, Collection<ComputedStatistics> computedStatistics)
Metadata
finishCreateTable
in interface Metadata
public InsertTableHandle beginInsert(Session session, TableHandle tableHandle)
Metadata
beginInsert
in interface Metadata
public Optional<ConnectorOutputMetadata> finishInsert(Session session, InsertTableHandle tableHandle, Collection<io.airlift.slice.Slice> fragments, Collection<ComputedStatistics> computedStatistics)
Metadata
finishInsert
in interface Metadata
public ColumnHandle getUpdateRowIdColumnHandle(Session session, TableHandle tableHandle)
Metadata
getUpdateRowIdColumnHandle
in interface Metadata
public boolean supportsMetadataDelete(Session session, TableHandle tableHandle)
supportsMetadataDelete
in interface Metadata
public OptionalLong metadataDelete(Session session, TableHandle tableHandle)
Metadata
metadataDelete
in interface Metadata
public TableHandle beginDelete(Session session, TableHandle tableHandle)
Metadata
beginDelete
in interface Metadata
public void finishDelete(Session session, TableHandle tableHandle, Collection<io.airlift.slice.Slice> fragments)
Metadata
finishDelete
in interface Metadata
public Optional<ConnectorId> getCatalogHandle(Session session, String catalogName)
Metadata
getCatalogHandle
in interface Metadata
public Map<String,ConnectorId> getCatalogNames(Session session)
Metadata
getCatalogNames
in interface Metadata
public List<QualifiedObjectName> listViews(Session session, QualifiedTablePrefix prefix)
Metadata
public Map<QualifiedObjectName,ViewDefinition> getViews(Session session, QualifiedTablePrefix prefix)
Metadata
public Optional<ViewDefinition> getView(Session session, QualifiedObjectName viewName)
Metadata
public void createView(Session session, String catalogName, ConnectorTableMetadata viewMetadata, String viewData, boolean replace)
Metadata
createView
in interface Metadata
public void dropView(Session session, QualifiedObjectName viewName)
Metadata
public Optional<ConnectorMaterializedViewDefinition> getMaterializedView(Session session, QualifiedObjectName viewName)
Metadata
getMaterializedView
in interface Metadata
public void createMaterializedView(Session session, String catalogName, ConnectorTableMetadata viewMetadata, ConnectorMaterializedViewDefinition viewDefinition, boolean ignoreExisting)
Metadata
createMaterializedView
in interface Metadata
public void dropMaterializedView(Session session, QualifiedObjectName viewName)
Metadata
dropMaterializedView
in interface Metadata
public MaterializedViewStatus getMaterializedViewStatus(Session session, QualifiedObjectName materializedViewName)
Metadata
getMaterializedViewStatus
in interface Metadata
public InsertTableHandle beginRefreshMaterializedView(Session session, TableHandle tableHandle)
Metadata
beginRefreshMaterializedView
in interface Metadata
public Optional<ConnectorOutputMetadata> finishRefreshMaterializedView(Session session, InsertTableHandle tableHandle, Collection<io.airlift.slice.Slice> fragments, Collection<ComputedStatistics> computedStatistics)
Metadata
finishRefreshMaterializedView
in interface Metadata
public List<QualifiedObjectName> getReferencedMaterializedViews(Session session, QualifiedObjectName tableName)
Metadata
getReferencedMaterializedViews
in interface Metadata
public Optional<ResolvedIndex> resolveIndex(Session session, TableHandle tableHandle, Set<ColumnHandle> indexableColumns, Set<ColumnHandle> outputColumns, TupleDomain<ColumnHandle> tupleDomain)
Metadata
resolveIndex
in interface Metadata
public void createRole(Session session, String role, Optional<PrestoPrincipal> grantor, String catalog)
Metadata
createRole
in interface Metadata
grantor
- represents the principal specified by WITH ADMIN statementpublic void dropRole(Session session, String role, String catalog)
Metadata
public Set<String> listRoles(Session session, String catalog)
Metadata
public Set<RoleGrant> listRoleGrants(Session session, String catalog, PrestoPrincipal principal)
Metadata
listRoleGrants
in interface Metadata
public void grantRoles(Session session, Set<String> roles, Set<PrestoPrincipal> grantees, boolean withAdminOption, Optional<PrestoPrincipal> grantor, String catalog)
Metadata
grantRoles
in interface Metadata
grantor
- represents the principal specified by GRANTED BY statementpublic void revokeRoles(Session session, Set<String> roles, Set<PrestoPrincipal> grantees, boolean adminOptionFor, Optional<PrestoPrincipal> grantor, String catalog)
Metadata
revokeRoles
in interface Metadata
grantor
- represents the principal specified by GRANTED BY statementpublic Set<RoleGrant> listApplicableRoles(Session session, PrestoPrincipal principal, String catalog)
Metadata
listApplicableRoles
in interface Metadata
public Set<String> listEnabledRoles(Session session, String catalog)
Metadata
listEnabledRoles
in interface Metadata
public void grantTablePrivileges(Session session, QualifiedObjectName tableName, Set<Privilege> privileges, PrestoPrincipal grantee, boolean grantOption)
Metadata
grantTablePrivileges
in interface Metadata
public void revokeTablePrivileges(Session session, QualifiedObjectName tableName, Set<Privilege> privileges, PrestoPrincipal grantee, boolean grantOption)
Metadata
revokeTablePrivileges
in interface Metadata
public List<GrantInfo> listTablePrivileges(Session session, QualifiedTablePrefix prefix)
Metadata
listTablePrivileges
in interface Metadata
public com.google.common.util.concurrent.ListenableFuture<Void> commitPageSinkAsync(Session session, OutputTableHandle tableHandle, Collection<io.airlift.slice.Slice> fragments)
Metadata
commitPageSinkAsync
in interface Metadata
public com.google.common.util.concurrent.ListenableFuture<Void> commitPageSinkAsync(Session session, InsertTableHandle tableHandle, Collection<io.airlift.slice.Slice> fragments)
Metadata
commitPageSinkAsync
in interface Metadata
public MetadataUpdates getMetadataUpdateResults(Session session, QueryManager queryManager, MetadataUpdates metadataUpdateRequests, QueryId queryId)
getMetadataUpdateResults
in interface Metadata
public FunctionAndTypeManager getFunctionAndTypeManager()
getFunctionAndTypeManager
in interface Metadata
public ProcedureRegistry getProcedureRegistry()
getProcedureRegistry
in interface Metadata
public BlockEncodingSerde getBlockEncodingSerde()
getBlockEncodingSerde
in interface Metadata
public SessionPropertyManager getSessionPropertyManager()
getSessionPropertyManager
in interface Metadata
public SchemaPropertyManager getSchemaPropertyManager()
getSchemaPropertyManager
in interface Metadata
public TablePropertyManager getTablePropertyManager()
getTablePropertyManager
in interface Metadata
public ColumnPropertyManager getColumnPropertyManager()
getColumnPropertyManager
in interface Metadata
public AnalyzePropertyManager getAnalyzePropertyManager()
getAnalyzePropertyManager
in interface Metadata
public Set<ConnectorCapabilities> getConnectorCapabilities(Session session, ConnectorId connectorId)
getConnectorCapabilities
in interface Metadata
public TableLayoutFilterCoverage getTableLayoutFilterCoverage(Session session, TableHandle tableHandle, Set<String> relevantPartitionColumns)
Metadata
getTableLayoutFilterCoverage
in interface Metadata
public Map<String,Collection<ConnectorMetadata>> getCatalogsByQueryId()
public static com.google.common.base.Function<SchemaTableName,QualifiedObjectName> convertFromSchemaTableName(String catalogName)
Copyright © 2012–2021. All rights reserved.