public class ClassLoaderSafeConnectorMetadata extends Object implements ConnectorMetadata
| Constructor and Description |
|---|
ClassLoaderSafeConnectorMetadata(ConnectorMetadata delegate,
ClassLoader classLoader) |
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(ConnectorSession session,
ConnectorTableHandle tableHandle,
ColumnMetadata column)
Add the specified column
|
ConnectorOutputTableHandle |
beginCreateTable(ConnectorSession session,
ConnectorTableMetadata tableMetadata,
Optional<ConnectorNewTableLayout> layout)
Begin the atomic creation of a table with data.
|
ConnectorTableHandle |
beginDelete(ConnectorSession session,
ConnectorTableHandle tableHandle)
Begin delete query
|
ConnectorInsertTableHandle |
beginInsert(ConnectorSession session,
ConnectorTableHandle tableHandle)
Begin insert query
|
void |
beginQuery(ConnectorSession session)
Start a SELECT/UPDATE/INSERT/DELETE query.
|
ConnectorInsertTableHandle |
beginRefreshMaterializedView(ConnectorSession session,
ConnectorTableHandle tableHandle)
Begin refresh materialized view
|
ConnectorTableHandle |
beginStatisticsCollection(ConnectorSession session,
ConnectorTableHandle tableHandle)
Begin statistics collection
|
void |
cleanupQuery(ConnectorSession session)
Cleanup after a SELECT/UPDATE/INSERT/DELETE query.
|
CompletableFuture<Void> |
commitPageSinkAsync(ConnectorSession session,
ConnectorInsertTableHandle tableHandle,
Collection<io.airlift.slice.Slice> fragments)
Commits page sink for table insertion.
|
CompletableFuture<Void> |
commitPageSinkAsync(ConnectorSession session,
ConnectorOutputTableHandle tableHandle,
Collection<io.airlift.slice.Slice> fragments)
Commits page sink for table creation.
|
void |
createMaterializedView(ConnectorSession session,
ConnectorTableMetadata viewMetadata,
ConnectorMaterializedViewDefinition viewDefinition,
boolean ignoreExisting)
Create the specified materialized view.
|
void |
createRole(ConnectorSession session,
String role,
Optional<PrestoPrincipal> grantor)
Creates the specified role.
|
void |
createSchema(ConnectorSession session,
String schemaName,
Map<String,Object> properties)
Creates a schema.
|
void |
createTable(ConnectorSession session,
ConnectorTableMetadata tableMetadata,
boolean ignoreExisting)
Creates a table using the specified table metadata.
|
ConnectorTableHandle |
createTemporaryTable(ConnectorSession session,
List<ColumnMetadata> columns,
Optional<ConnectorPartitioningMetadata> partitioningMetadata)
Creates a temporary table with optional partitioning requirements.
|
void |
createView(ConnectorSession session,
ConnectorTableMetadata viewMetadata,
String viewData,
boolean replace)
Create the specified view.
|
void |
doMetadataUpdateCleanup(QueryId queryId) |
void |
dropColumn(ConnectorSession session,
ConnectorTableHandle tableHandle,
ColumnHandle column)
Drop the specified column
|
void |
dropMaterializedView(ConnectorSession session,
SchemaTableName viewName)
Drop the specified materialized view.
|
void |
dropRole(ConnectorSession session,
String role)
Drops the specified role.
|
void |
dropSchema(ConnectorSession session,
String schemaName)
Drops the specified schema.
|
void |
dropTable(ConnectorSession session,
ConnectorTableHandle tableHandle)
Drops the specified table
|
void |
dropView(ConnectorSession session,
SchemaTableName viewName)
Drop the specified view.
|
Optional<ConnectorOutputMetadata> |
finishCreateTable(ConnectorSession session,
ConnectorOutputTableHandle tableHandle,
Collection<io.airlift.slice.Slice> fragments,
Collection<ComputedStatistics> computedStatistics)
Finish a table creation with data after the data is written.
|
void |
finishDelete(ConnectorSession session,
ConnectorTableHandle tableHandle,
Collection<io.airlift.slice.Slice> fragments)
Finish delete query
|
Optional<ConnectorOutputMetadata> |
finishInsert(ConnectorSession session,
ConnectorInsertTableHandle insertHandle,
Collection<io.airlift.slice.Slice> fragments,
Collection<ComputedStatistics> computedStatistics)
Finish insert query
|
Optional<ConnectorOutputMetadata> |
finishRefreshMaterializedView(ConnectorSession session,
ConnectorInsertTableHandle insertHandle,
Collection<io.airlift.slice.Slice> fragments,
Collection<ComputedStatistics> computedStatistics)
Finish refresh materialized view
|
void |
finishStatisticsCollection(ConnectorSession session,
ConnectorTableHandle tableHandle,
Collection<ComputedStatistics> computedStatistics)
Finish statistics collection
|
ConnectorTableLayoutHandle |
getAlternativeLayoutHandle(ConnectorSession session,
ConnectorTableLayoutHandle tableLayoutHandle,
ConnectorPartitioningHandle partitioningHandle)
Return a table layout handle whose partitioning is converted to the provided partitioning handle,
but otherwise identical to the provided table layout handle.
|
Map<String,ColumnHandle> |
getColumnHandles(ConnectorSession session,
ConnectorTableHandle tableHandle)
Gets all of the columns on the specified table, or an empty map if the columns can not be enumerated.
|
ColumnMetadata |
getColumnMetadata(ConnectorSession session,
ConnectorTableHandle tableHandle,
ColumnHandle columnHandle)
Gets the metadata for the specified table column.
|
Optional<ConnectorPartitioningHandle> |
getCommonPartitioningHandle(ConnectorSession session,
ConnectorPartitioningHandle left,
ConnectorPartitioningHandle right)
Return a partitioning handle which the connector can transparently convert both
left and right into. |
Optional<Object> |
getInfo(ConnectorTableLayoutHandle table)
Return the connector-specific metadata for the specified table layout.
|
Optional<ConnectorNewTableLayout> |
getInsertLayout(ConnectorSession session,
ConnectorTableHandle tableHandle)
Get the physical layout for a inserting into an existing table.
|
Optional<ConnectorMaterializedViewDefinition> |
getMaterializedView(ConnectorSession session,
SchemaTableName viewName)
Gets the materialized view data for the specified materialized view name.
|
MaterializedViewStatus |
getMaterializedViewStatus(ConnectorSession session,
SchemaTableName materializedViewName) |
MaterializedViewStatus |
getMaterializedViewStatus(ConnectorSession session,
SchemaTableName materializedViewName,
TupleDomain<String> baseQueryDomain)
Get the materialized view status to inform the engine how much data has been materialized in the view
|
List<ConnectorMetadataUpdateHandle> |
getMetadataUpdateResults(List<ConnectorMetadataUpdateHandle> metadataUpdateRequests,
QueryId queryId)
Handles metadata update requests and sends the results back to worker
|
Optional<ConnectorNewTableLayout> |
getNewTableLayout(ConnectorSession session,
ConnectorTableMetadata tableMetadata)
Get the physical layout for a new table.
|
ConnectorPartitioningHandle |
getPartitioningHandleForExchange(ConnectorSession session,
int partitionCount,
List<Type> partitionTypes)
Provides partitioning handle for exchange.
|
Optional<ConnectorNewTableLayout> |
getPreferredShuffleLayoutForInsert(ConnectorSession session,
ConnectorTableHandle tableHandle)
A connector can have preferred shuffle layout for table write.
|
Optional<ConnectorNewTableLayout> |
getPreferredShuffleLayoutForNewTable(ConnectorSession session,
ConnectorTableMetadata tableMetadata)
A connector can have preferred shuffle layout for table write.
|
Optional<List<SchemaTableName>> |
getReferencedMaterializedViews(ConnectorSession session,
SchemaTableName tableName)
Gets the referenced materialized views for a give table
|
TableStatisticsMetadata |
getStatisticsCollectionMetadata(ConnectorSession session,
ConnectorTableMetadata tableMetadata)
Describe statistics that must be collected during a statistics collection
|
TableStatisticsMetadata |
getStatisticsCollectionMetadataForWrite(ConnectorSession session,
ConnectorTableMetadata tableMetadata)
Describes statistics that must be collected during a write.
|
Optional<SystemTable> |
getSystemTable(ConnectorSession session,
SchemaTableName tableName)
Returns the system table for the specified table name, if one exists.
|
ConnectorTableHandle |
getTableHandle(ConnectorSession session,
SchemaTableName tableName)
Returns a table handle for the specified table name, or null if the connector does not contain the table.
|
ConnectorTableHandle |
getTableHandleForStatisticsCollection(ConnectorSession session,
SchemaTableName tableName,
Map<String,Object> analyzeProperties)
Returns a table handle for the specified table name, or null if the connector does not contain the table.
|
ConnectorTableLayout |
getTableLayout(ConnectorSession session,
ConnectorTableLayoutHandle handle) |
TableLayoutFilterCoverage |
getTableLayoutFilterCoverage(ConnectorTableLayoutHandle tableHandle,
Set<String> relevantPartitionColumns) |
List<ConnectorTableLayoutResult> |
getTableLayouts(ConnectorSession session,
ConnectorTableHandle table,
Constraint<ColumnHandle> constraint,
Optional<Set<ColumnHandle>> desiredColumns)
Return a list of table layouts that satisfy the given constraint.
|
ConnectorTableMetadata |
getTableMetadata(ConnectorSession session,
ConnectorTableHandle table)
Return the metadata for the specified table handle.
|
TableStatistics |
getTableStatistics(ConnectorSession session,
ConnectorTableHandle tableHandle,
Optional<ConnectorTableLayoutHandle> tableLayoutHandle,
List<ColumnHandle> columnHandles,
Constraint<ColumnHandle> constraint)
Get statistics for table for given columns and filtering constraint.
|
ColumnHandle |
getUpdateRowIdColumnHandle(ConnectorSession session,
ConnectorTableHandle tableHandle)
Get the column handle that will generate row IDs for the delete operation.
|
Map<SchemaTableName,ConnectorViewDefinition> |
getViews(ConnectorSession session,
SchemaTablePrefix prefix)
Gets the view data for views that match the specified table prefix.
|
void |
grantRoles(ConnectorSession connectorSession,
Set<String> roles,
Set<PrestoPrincipal> grantees,
boolean withAdminOption,
Optional<PrestoPrincipal> grantor)
Grants the specified roles to the specified grantees
|
void |
grantTablePrivileges(ConnectorSession session,
SchemaTableName tableName,
Set<Privilege> privileges,
PrestoPrincipal grantee,
boolean grantOption)
Grants the specified privilege to the specified user on the specified table
|
boolean |
isLegacyGetLayoutSupported(ConnectorSession session,
ConnectorTableHandle tableHandle)
Experimental: if true, the engine will invoke getLayout otherwise, getLayout will not be called.
|
boolean |
isRefinedPartitioningOver(ConnectorSession session,
ConnectorPartitioningHandle left,
ConnectorPartitioningHandle right)
Partitioning
a = {a_1, ... |
Set<RoleGrant> |
listApplicableRoles(ConnectorSession session,
PrestoPrincipal principal)
List applicable roles, including the transitive grants, for the specified principal
|
Set<String> |
listEnabledRoles(ConnectorSession session)
List applicable roles, including the transitive grants, in given session
|
Set<RoleGrant> |
listRoleGrants(ConnectorSession session,
PrestoPrincipal principal)
List role grants for a given principal, not recursively.
|
Set<String> |
listRoles(ConnectorSession session)
List available roles.
|
List<String> |
listSchemaNames(ConnectorSession session)
Returns the schemas provided by this connector.
|
Map<SchemaTableName,List<ColumnMetadata>> |
listTableColumns(ConnectorSession session,
SchemaTablePrefix prefix)
Gets the metadata for all columns that match the specified table prefix.
|
List<GrantInfo> |
listTablePrivileges(ConnectorSession session,
SchemaTablePrefix prefix)
List the table privileges granted to the specified grantee for the tables that have the specified prefix considering the selected session role
|
List<SchemaTableName> |
listTables(ConnectorSession session,
Optional<String> schemaName)
List table names, possibly filtered by schema.
|
List<SchemaTableName> |
listTables(ConnectorSession session,
String schemaNameOrNull)
List table names, possibly filtered by schema.
|
List<SchemaTableName> |
listViews(ConnectorSession session,
Optional<String> schemaName) |
List<SchemaTableName> |
listViews(ConnectorSession session,
String schemaNameOrNull)
List view names, possibly filtered by schema.
|
OptionalLong |
metadataDelete(ConnectorSession session,
ConnectorTableHandle tableHandle,
ConnectorTableLayoutHandle tableLayoutHandle)
Delete the provided table layout
|
void |
renameColumn(ConnectorSession session,
ConnectorTableHandle tableHandle,
ColumnHandle source,
String target)
Rename the specified column
|
void |
renameSchema(ConnectorSession session,
String source,
String target)
Renames the specified schema.
|
void |
renameTable(ConnectorSession session,
ConnectorTableHandle tableHandle,
SchemaTableName newTableName)
Rename the specified table
|
Optional<ConnectorResolvedIndex> |
resolveIndex(ConnectorSession session,
ConnectorTableHandle 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(ConnectorSession connectorSession,
Set<String> roles,
Set<PrestoPrincipal> grantees,
boolean adminOptionFor,
Optional<PrestoPrincipal> grantor)
Revokes the specified roles from the specified grantees
|
void |
revokeTablePrivileges(ConnectorSession session,
SchemaTableName tableName,
Set<Privilege> privileges,
PrestoPrincipal grantee,
boolean grantOption)
Revokes the specified privilege on the specified table from the specified user
|
boolean |
schemaExists(ConnectorSession session,
String schemaName)
Checks if a schema exists.
|
boolean |
supportsMetadataDelete(ConnectorSession session,
ConnectorTableHandle tableHandle,
Optional<ConnectorTableLayoutHandle> tableLayoutHandle) |
TupleDomain<ColumnHandle> |
toExplainIOConstraints(ConnectorSession session,
ConnectorTableHandle tableHandle,
TupleDomain<ColumnHandle> constraints)
Returns a TupleDomain of constraints that is suitable for ExplainIO
|
void |
truncateTable(ConnectorSession session,
ConnectorTableHandle tableHandle)
Truncates the specified table
|
public ClassLoaderSafeConnectorMetadata(ConnectorMetadata delegate, ClassLoader classLoader)
public List<ConnectorTableLayoutResult> getTableLayouts(ConnectorSession session, ConnectorTableHandle table, Constraint<ColumnHandle> constraint, Optional<Set<ColumnHandle>> desiredColumns)
ConnectorMetadataFor each layout, connectors must return an "unenforced constraint" representing the part of the constraint summary that isn't guaranteed by the layout.
getTableLayouts in interface ConnectorMetadatapublic ConnectorTableLayout getTableLayout(ConnectorSession session, ConnectorTableLayoutHandle handle)
getTableLayout in interface ConnectorMetadatapublic boolean isLegacyGetLayoutSupported(ConnectorSession session, ConnectorTableHandle tableHandle)
ConnectorMetadataisLegacyGetLayoutSupported in interface ConnectorMetadatapublic Optional<ConnectorPartitioningHandle> getCommonPartitioningHandle(ConnectorSession session, ConnectorPartitioningHandle left, ConnectorPartitioningHandle right)
ConnectorMetadataleft and right into.getCommonPartitioningHandle in interface ConnectorMetadatapublic boolean isRefinedPartitioningOver(ConnectorSession session, ConnectorPartitioningHandle left, ConnectorPartitioningHandle right)
ConnectorMetadataa = {a_1, ... a_n} is considered as a refined partitioning over
partitioning b = {b_1, ... b_m} if:
b_i in partitioning b,
the rows it contains is the same as union of a set of partitions a_{i_1}, a_{i_2}, ... a_{i_k}
in partitioning a, i.e.
b_i = a_{i_1} + a_{i_2} + ... + a_{i_k}
a to partitioning b
associated with the provided table layout handle.
For example, consider two partitioning over order table:
a has 256 partitions by orderkey % 256
b has 128 partitions by orderkey % 128
Partitioning a is a refined partitioning over b if Connector supports
transparently convert a to b.
Refined-over relation is reflexive.
This SPI is unstable and subject to change in the future.
isRefinedPartitioningOver in interface ConnectorMetadatapublic ConnectorPartitioningHandle getPartitioningHandleForExchange(ConnectorSession session, int partitionCount, List<Type> partitionTypes)
ConnectorMetadatagetPartitioningHandleForExchange in interface ConnectorMetadatapublic ConnectorTableLayoutHandle getAlternativeLayoutHandle(ConnectorSession session, ConnectorTableLayoutHandle tableLayoutHandle, ConnectorPartitioningHandle partitioningHandle)
ConnectorMetadataConnectorMetadata.getCommonPartitioningHandle(com.facebook.presto.spi.ConnectorSession, com.facebook.presto.spi.connector.ConnectorPartitioningHandle, com.facebook.presto.spi.connector.ConnectorPartitioningHandle).getAlternativeLayoutHandle in interface ConnectorMetadatapublic Optional<ConnectorNewTableLayout> getNewTableLayout(ConnectorSession session, ConnectorTableMetadata tableMetadata)
ConnectorMetadatagetNewTableLayout in interface ConnectorMetadatapublic Optional<ConnectorNewTableLayout> getPreferredShuffleLayoutForNewTable(ConnectorSession session, ConnectorTableMetadata tableMetadata)
ConnectorMetadatapublic Optional<ConnectorNewTableLayout> getInsertLayout(ConnectorSession session, ConnectorTableHandle tableHandle)
ConnectorMetadatagetInsertLayout in interface ConnectorMetadatapublic Optional<ConnectorNewTableLayout> getPreferredShuffleLayoutForInsert(ConnectorSession session, ConnectorTableHandle tableHandle)
ConnectorMetadatapublic TableStatisticsMetadata getStatisticsCollectionMetadataForWrite(ConnectorSession session, ConnectorTableMetadata tableMetadata)
ConnectorMetadatagetStatisticsCollectionMetadataForWrite in interface ConnectorMetadatapublic TableStatisticsMetadata getStatisticsCollectionMetadata(ConnectorSession session, ConnectorTableMetadata tableMetadata)
ConnectorMetadatagetStatisticsCollectionMetadata in interface ConnectorMetadatapublic ConnectorTableHandle beginStatisticsCollection(ConnectorSession session, ConnectorTableHandle tableHandle)
ConnectorMetadatabeginStatisticsCollection in interface ConnectorMetadatapublic void finishStatisticsCollection(ConnectorSession session, ConnectorTableHandle tableHandle, Collection<ComputedStatistics> computedStatistics)
ConnectorMetadatafinishStatisticsCollection in interface ConnectorMetadatapublic boolean schemaExists(ConnectorSession session, String schemaName)
ConnectorMetadataConnectorMetadata.listSchemaNames(com.facebook.presto.spi.ConnectorSession).schemaExists in interface ConnectorMetadatapublic List<String> listSchemaNames(ConnectorSession session)
ConnectorMetadatalistSchemaNames in interface ConnectorMetadatapublic ConnectorTableHandle getTableHandle(ConnectorSession session, SchemaTableName tableName)
ConnectorMetadatagetTableHandle in interface ConnectorMetadatapublic ConnectorTableHandle getTableHandleForStatisticsCollection(ConnectorSession session, SchemaTableName tableName, Map<String,Object> analyzeProperties)
ConnectorMetadatagetTableHandleForStatisticsCollection in interface ConnectorMetadatapublic Optional<SystemTable> getSystemTable(ConnectorSession session, SchemaTableName tableName)
ConnectorMetadataConnectorMetadata.getSystemTable(com.facebook.presto.spi.ConnectorSession, com.facebook.presto.spi.SchemaTableName) differ form those returned by Connector.getSystemTables().
The former mechanism allows dynamic resolution of system tables, while the latter is
based on static list of system tables built during startup.getSystemTable in interface ConnectorMetadatapublic ConnectorTableMetadata getTableMetadata(ConnectorSession session, ConnectorTableHandle table)
ConnectorMetadatagetTableMetadata in interface ConnectorMetadatapublic Optional<Object> getInfo(ConnectorTableLayoutHandle table)
ConnectorMetadatagetInfo in interface ConnectorMetadatapublic List<SchemaTableName> listTables(ConnectorSession session, Optional<String> schemaName)
ConnectorMetadatalistTables in interface ConnectorMetadatapublic List<SchemaTableName> listTables(ConnectorSession session, String schemaNameOrNull)
ConnectorMetadatalistTables in interface ConnectorMetadatapublic Optional<List<SchemaTableName>> getReferencedMaterializedViews(ConnectorSession session, SchemaTableName tableName)
ConnectorMetadatagetReferencedMaterializedViews in interface ConnectorMetadatapublic Map<String,ColumnHandle> getColumnHandles(ConnectorSession session, ConnectorTableHandle tableHandle)
ConnectorMetadatagetColumnHandles in interface ConnectorMetadatapublic ColumnMetadata getColumnMetadata(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle columnHandle)
ConnectorMetadatagetColumnMetadata in interface ConnectorMetadatapublic TupleDomain<ColumnHandle> toExplainIOConstraints(ConnectorSession session, ConnectorTableHandle tableHandle, TupleDomain<ColumnHandle> constraints)
ConnectorMetadatatoExplainIOConstraints in interface ConnectorMetadatapublic Map<SchemaTableName,List<ColumnMetadata>> listTableColumns(ConnectorSession session, SchemaTablePrefix prefix)
ConnectorMetadatalistTableColumns in interface ConnectorMetadatapublic TableStatistics getTableStatistics(ConnectorSession session, ConnectorTableHandle tableHandle, Optional<ConnectorTableLayoutHandle> tableLayoutHandle, List<ColumnHandle> columnHandles, Constraint<ColumnHandle> constraint)
ConnectorMetadatagetTableStatistics in interface ConnectorMetadatapublic void addColumn(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnMetadata column)
ConnectorMetadataaddColumn in interface ConnectorMetadatapublic void createSchema(ConnectorSession session, String schemaName, Map<String,Object> properties)
ConnectorMetadatacreateSchema in interface ConnectorMetadatapublic void dropSchema(ConnectorSession session, String schemaName)
ConnectorMetadatadropSchema in interface ConnectorMetadatapublic void renameSchema(ConnectorSession session, String source, String target)
ConnectorMetadatarenameSchema in interface ConnectorMetadatapublic void createTable(ConnectorSession session, ConnectorTableMetadata tableMetadata, boolean ignoreExisting)
ConnectorMetadatacreateTable in interface ConnectorMetadatapublic ConnectorTableHandle createTemporaryTable(ConnectorSession session, List<ColumnMetadata> columns, Optional<ConnectorPartitioningMetadata> partitioningMetadata)
ConnectorMetadataThis SPI is unstable and subject to change in the future.
createTemporaryTable in interface ConnectorMetadatapublic void dropTable(ConnectorSession session, ConnectorTableHandle tableHandle)
ConnectorMetadatadropTable in interface ConnectorMetadatapublic void truncateTable(ConnectorSession session, ConnectorTableHandle tableHandle)
ConnectorMetadatatruncateTable in interface ConnectorMetadatapublic void renameColumn(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle source, String target)
ConnectorMetadatarenameColumn in interface ConnectorMetadatapublic void dropColumn(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle column)
ConnectorMetadatadropColumn in interface ConnectorMetadatapublic void renameTable(ConnectorSession session, ConnectorTableHandle tableHandle, SchemaTableName newTableName)
ConnectorMetadatarenameTable in interface ConnectorMetadatapublic ConnectorOutputTableHandle beginCreateTable(ConnectorSession session, ConnectorTableMetadata tableMetadata, Optional<ConnectorNewTableLayout> layout)
ConnectorMetadatabeginCreateTable in interface ConnectorMetadatapublic Optional<ConnectorOutputMetadata> finishCreateTable(ConnectorSession session, ConnectorOutputTableHandle tableHandle, Collection<io.airlift.slice.Slice> fragments, Collection<ComputedStatistics> computedStatistics)
ConnectorMetadatafinishCreateTable in interface ConnectorMetadatapublic void beginQuery(ConnectorSession session)
ConnectorMetadatabeginQuery in interface ConnectorMetadatapublic void cleanupQuery(ConnectorSession session)
ConnectorMetadatacleanupQuery in interface ConnectorMetadatapublic ConnectorInsertTableHandle beginInsert(ConnectorSession session, ConnectorTableHandle tableHandle)
ConnectorMetadatabeginInsert in interface ConnectorMetadatapublic Optional<ConnectorOutputMetadata> finishInsert(ConnectorSession session, ConnectorInsertTableHandle insertHandle, Collection<io.airlift.slice.Slice> fragments, Collection<ComputedStatistics> computedStatistics)
ConnectorMetadatafinishInsert in interface ConnectorMetadatapublic void createView(ConnectorSession session, ConnectorTableMetadata viewMetadata, String viewData, boolean replace)
ConnectorMetadatacreateView in interface ConnectorMetadatapublic void dropView(ConnectorSession session, SchemaTableName viewName)
ConnectorMetadatadropView in interface ConnectorMetadatapublic List<SchemaTableName> listViews(ConnectorSession session, Optional<String> schemaName)
listViews in interface ConnectorMetadatapublic List<SchemaTableName> listViews(ConnectorSession session, String schemaNameOrNull)
ConnectorMetadatalistViews in interface ConnectorMetadatapublic Map<SchemaTableName,ConnectorViewDefinition> getViews(ConnectorSession session, SchemaTablePrefix prefix)
ConnectorMetadatagetViews in interface ConnectorMetadatapublic Optional<ConnectorMaterializedViewDefinition> getMaterializedView(ConnectorSession session, SchemaTableName viewName)
ConnectorMetadatagetMaterializedView in interface ConnectorMetadatapublic void createMaterializedView(ConnectorSession session, ConnectorTableMetadata viewMetadata, ConnectorMaterializedViewDefinition viewDefinition, boolean ignoreExisting)
ConnectorMetadatacreateMaterializedView in interface ConnectorMetadatapublic void dropMaterializedView(ConnectorSession session, SchemaTableName viewName)
ConnectorMetadatadropMaterializedView in interface ConnectorMetadatapublic MaterializedViewStatus getMaterializedViewStatus(ConnectorSession session, SchemaTableName materializedViewName)
getMaterializedViewStatus in interface ConnectorMetadatapublic MaterializedViewStatus getMaterializedViewStatus(ConnectorSession session, SchemaTableName materializedViewName, TupleDomain<String> baseQueryDomain)
ConnectorMetadatagetMaterializedViewStatus in interface ConnectorMetadatabaseQueryDomain - The domain from which to consider missing partitions. For example, a query that
selects a specific date range can consider only partitions from that range when determining view staleness.public ConnectorInsertTableHandle beginRefreshMaterializedView(ConnectorSession session, ConnectorTableHandle tableHandle)
ConnectorMetadatabeginRefreshMaterializedView in interface ConnectorMetadatapublic Optional<ConnectorOutputMetadata> finishRefreshMaterializedView(ConnectorSession session, ConnectorInsertTableHandle insertHandle, Collection<io.airlift.slice.Slice> fragments, Collection<ComputedStatistics> computedStatistics)
ConnectorMetadatafinishRefreshMaterializedView in interface ConnectorMetadatapublic ColumnHandle getUpdateRowIdColumnHandle(ConnectorSession session, ConnectorTableHandle tableHandle)
ConnectorMetadatadeleteRows() method of the
UpdatablePageSource that created them.getUpdateRowIdColumnHandle in interface ConnectorMetadatapublic ConnectorTableHandle beginDelete(ConnectorSession session, ConnectorTableHandle tableHandle)
ConnectorMetadatabeginDelete in interface ConnectorMetadatapublic void finishDelete(ConnectorSession session, ConnectorTableHandle tableHandle, Collection<io.airlift.slice.Slice> fragments)
ConnectorMetadatafinishDelete in interface ConnectorMetadatafragments - all fragments returned by UpdatablePageSource.finish()public boolean supportsMetadataDelete(ConnectorSession session, ConnectorTableHandle tableHandle, Optional<ConnectorTableLayoutHandle> tableLayoutHandle)
supportsMetadataDelete in interface ConnectorMetadatapublic OptionalLong metadataDelete(ConnectorSession session, ConnectorTableHandle tableHandle, ConnectorTableLayoutHandle tableLayoutHandle)
ConnectorMetadatametadataDelete in interface ConnectorMetadatapublic Optional<ConnectorResolvedIndex> resolveIndex(ConnectorSession session, ConnectorTableHandle tableHandle, Set<ColumnHandle> indexableColumns, Set<ColumnHandle> outputColumns, TupleDomain<ColumnHandle> tupleDomain)
ConnectorMetadataresolveIndex in interface ConnectorMetadatapublic void createRole(ConnectorSession session, String role, Optional<PrestoPrincipal> grantor)
ConnectorMetadatacreateRole in interface ConnectorMetadatagrantor - represents the principal specified by WITH ADMIN statementpublic void dropRole(ConnectorSession session, String role)
ConnectorMetadatadropRole in interface ConnectorMetadatapublic Set<String> listRoles(ConnectorSession session)
ConnectorMetadatalistRoles in interface ConnectorMetadatapublic Set<RoleGrant> listRoleGrants(ConnectorSession session, PrestoPrincipal principal)
ConnectorMetadatalistRoleGrants in interface ConnectorMetadatapublic void grantRoles(ConnectorSession connectorSession, Set<String> roles, Set<PrestoPrincipal> grantees, boolean withAdminOption, Optional<PrestoPrincipal> grantor)
ConnectorMetadatagrantRoles in interface ConnectorMetadatagrantor - represents the principal specified by GRANTED BY statementpublic void revokeRoles(ConnectorSession connectorSession, Set<String> roles, Set<PrestoPrincipal> grantees, boolean adminOptionFor, Optional<PrestoPrincipal> grantor)
ConnectorMetadatarevokeRoles in interface ConnectorMetadatagrantor - represents the principal specified by GRANTED BY statementpublic Set<RoleGrant> listApplicableRoles(ConnectorSession session, PrestoPrincipal principal)
ConnectorMetadatalistApplicableRoles in interface ConnectorMetadatapublic Set<String> listEnabledRoles(ConnectorSession session)
ConnectorMetadatalistEnabledRoles in interface ConnectorMetadatapublic void grantTablePrivileges(ConnectorSession session, SchemaTableName tableName, Set<Privilege> privileges, PrestoPrincipal grantee, boolean grantOption)
ConnectorMetadatagrantTablePrivileges in interface ConnectorMetadatapublic void revokeTablePrivileges(ConnectorSession session, SchemaTableName tableName, Set<Privilege> privileges, PrestoPrincipal grantee, boolean grantOption)
ConnectorMetadatarevokeTablePrivileges in interface ConnectorMetadatapublic List<GrantInfo> listTablePrivileges(ConnectorSession session, SchemaTablePrefix prefix)
ConnectorMetadatalistTablePrivileges in interface ConnectorMetadatapublic CompletableFuture<Void> commitPageSinkAsync(ConnectorSession session, ConnectorOutputTableHandle tableHandle, Collection<io.airlift.slice.Slice> fragments)
ConnectorMetadatacommitPageSinkAsync in interface ConnectorMetadatapublic CompletableFuture<Void> commitPageSinkAsync(ConnectorSession session, ConnectorInsertTableHandle tableHandle, Collection<io.airlift.slice.Slice> fragments)
ConnectorMetadatacommitPageSinkAsync in interface ConnectorMetadatapublic List<ConnectorMetadataUpdateHandle> getMetadataUpdateResults(List<ConnectorMetadataUpdateHandle> metadataUpdateRequests, QueryId queryId)
ConnectorMetadatagetMetadataUpdateResults in interface ConnectorMetadatapublic void doMetadataUpdateCleanup(QueryId queryId)
doMetadataUpdateCleanup in interface ConnectorMetadatapublic TableLayoutFilterCoverage getTableLayoutFilterCoverage(ConnectorTableLayoutHandle tableHandle, Set<String> relevantPartitionColumns)
getTableLayoutFilterCoverage in interface ConnectorMetadataCopyright © 2012–2022. All rights reserved.