Package io.trino.plugin.base.classloader
Class ClassLoaderSafeConnectorMetadata
- java.lang.Object
-
- io.trino.plugin.base.classloader.ClassLoaderSafeConnectorMetadata
-
- All Implemented Interfaces:
ConnectorMetadata
public class ClassLoaderSafeConnectorMetadata extends Object implements ConnectorMetadata
-
-
Constructor Summary
Constructors Constructor Description ClassLoaderSafeConnectorMetadata(ConnectorMetadata delegate, ClassLoader classLoader)
-
Method Summary
-
-
-
Constructor Detail
-
ClassLoaderSafeConnectorMetadata
@Inject public ClassLoaderSafeConnectorMetadata(ConnectorMetadata delegate, ClassLoader classLoader)
-
-
Method Detail
-
getTableLayouts
public List<ConnectorTableLayoutResult> getTableLayouts(ConnectorSession session, ConnectorTableHandle table, Constraint constraint, Optional<Set<ColumnHandle>> desiredColumns)
- Specified by:
getTableLayoutsin interfaceConnectorMetadata
-
getTableLayout
public ConnectorTableLayout getTableLayout(ConnectorSession session, ConnectorTableLayoutHandle handle)
- Specified by:
getTableLayoutin interfaceConnectorMetadata
-
getCommonPartitioningHandle
public Optional<ConnectorPartitioningHandle> getCommonPartitioningHandle(ConnectorSession session, ConnectorPartitioningHandle left, ConnectorPartitioningHandle right)
- Specified by:
getCommonPartitioningHandlein interfaceConnectorMetadata
-
makeCompatiblePartitioning
public ConnectorTableLayoutHandle makeCompatiblePartitioning(ConnectorSession session, ConnectorTableLayoutHandle tableLayoutHandle, ConnectorPartitioningHandle partitioningHandle)
- Specified by:
makeCompatiblePartitioningin interfaceConnectorMetadata
-
makeCompatiblePartitioning
public ConnectorTableHandle makeCompatiblePartitioning(ConnectorSession session, ConnectorTableHandle tableHandle, ConnectorPartitioningHandle partitioningHandle)
- Specified by:
makeCompatiblePartitioningin interfaceConnectorMetadata
-
getNewTableLayout
public Optional<ConnectorNewTableLayout> getNewTableLayout(ConnectorSession session, ConnectorTableMetadata tableMetadata)
- Specified by:
getNewTableLayoutin interfaceConnectorMetadata
-
getInsertLayout
public Optional<ConnectorNewTableLayout> getInsertLayout(ConnectorSession session, ConnectorTableHandle tableHandle)
- Specified by:
getInsertLayoutin interfaceConnectorMetadata
-
getStatisticsCollectionMetadataForWrite
public TableStatisticsMetadata getStatisticsCollectionMetadataForWrite(ConnectorSession session, ConnectorTableMetadata tableMetadata)
- Specified by:
getStatisticsCollectionMetadataForWritein interfaceConnectorMetadata
-
getStatisticsCollectionMetadata
public TableStatisticsMetadata getStatisticsCollectionMetadata(ConnectorSession session, ConnectorTableMetadata tableMetadata)
- Specified by:
getStatisticsCollectionMetadatain interfaceConnectorMetadata
-
beginStatisticsCollection
public ConnectorTableHandle beginStatisticsCollection(ConnectorSession session, ConnectorTableHandle tableHandle)
- Specified by:
beginStatisticsCollectionin interfaceConnectorMetadata
-
finishStatisticsCollection
public void finishStatisticsCollection(ConnectorSession session, ConnectorTableHandle tableHandle, Collection<ComputedStatistics> computedStatistics)
- Specified by:
finishStatisticsCollectionin interfaceConnectorMetadata
-
schemaExists
public boolean schemaExists(ConnectorSession session, String schemaName)
- Specified by:
schemaExistsin interfaceConnectorMetadata
-
listSchemaNames
public List<String> listSchemaNames(ConnectorSession session)
- Specified by:
listSchemaNamesin interfaceConnectorMetadata
-
getTableHandle
public ConnectorTableHandle getTableHandle(ConnectorSession session, SchemaTableName tableName)
- Specified by:
getTableHandlein interfaceConnectorMetadata
-
getTableHandleForStatisticsCollection
public ConnectorTableHandle getTableHandleForStatisticsCollection(ConnectorSession session, SchemaTableName tableName, Map<String,Object> analyzeProperties)
- Specified by:
getTableHandleForStatisticsCollectionin interfaceConnectorMetadata
-
getSystemTable
public Optional<SystemTable> getSystemTable(ConnectorSession session, SchemaTableName tableName)
- Specified by:
getSystemTablein interfaceConnectorMetadata
-
getTableSchema
public ConnectorTableSchema getTableSchema(ConnectorSession session, ConnectorTableHandle table)
- Specified by:
getTableSchemain interfaceConnectorMetadata
-
getTableMetadata
public ConnectorTableMetadata getTableMetadata(ConnectorSession session, ConnectorTableHandle table)
- Specified by:
getTableMetadatain interfaceConnectorMetadata
-
getInfo
public Optional<Object> getInfo(ConnectorTableLayoutHandle table)
- Specified by:
getInfoin interfaceConnectorMetadata
-
getInfo
public Optional<Object> getInfo(ConnectorTableHandle table)
- Specified by:
getInfoin interfaceConnectorMetadata
-
listTables
public List<SchemaTableName> listTables(ConnectorSession session, Optional<String> schemaName)
- Specified by:
listTablesin interfaceConnectorMetadata
-
getColumnHandles
public Map<String,ColumnHandle> getColumnHandles(ConnectorSession session, ConnectorTableHandle tableHandle)
- Specified by:
getColumnHandlesin interfaceConnectorMetadata
-
getColumnMetadata
public ColumnMetadata getColumnMetadata(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle columnHandle)
- Specified by:
getColumnMetadatain interfaceConnectorMetadata
-
listTableColumns
public Map<SchemaTableName,List<ColumnMetadata>> listTableColumns(ConnectorSession session, SchemaTablePrefix prefix)
- Specified by:
listTableColumnsin interfaceConnectorMetadata
-
streamTableColumns
public Stream<TableColumnsMetadata> streamTableColumns(ConnectorSession session, SchemaTablePrefix prefix)
- Specified by:
streamTableColumnsin interfaceConnectorMetadata
-
getTableStatistics
public TableStatistics getTableStatistics(ConnectorSession session, ConnectorTableHandle tableHandle, Constraint constraint)
- Specified by:
getTableStatisticsin interfaceConnectorMetadata
-
addColumn
public void addColumn(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnMetadata column)
- Specified by:
addColumnin interfaceConnectorMetadata
-
setTableAuthorization
public void setTableAuthorization(ConnectorSession session, SchemaTableName table, TrinoPrincipal principal)
- Specified by:
setTableAuthorizationin interfaceConnectorMetadata
-
createSchema
public void createSchema(ConnectorSession session, String schemaName, Map<String,Object> properties, TrinoPrincipal owner)
- Specified by:
createSchemain interfaceConnectorMetadata
-
dropSchema
public void dropSchema(ConnectorSession session, String schemaName)
- Specified by:
dropSchemain interfaceConnectorMetadata
-
renameSchema
public void renameSchema(ConnectorSession session, String source, String target)
- Specified by:
renameSchemain interfaceConnectorMetadata
-
setSchemaAuthorization
public void setSchemaAuthorization(ConnectorSession session, String source, TrinoPrincipal principal)
- Specified by:
setSchemaAuthorizationin interfaceConnectorMetadata
-
createTable
public void createTable(ConnectorSession session, ConnectorTableMetadata tableMetadata, boolean ignoreExisting)
- Specified by:
createTablein interfaceConnectorMetadata
-
dropTable
public void dropTable(ConnectorSession session, ConnectorTableHandle tableHandle)
- Specified by:
dropTablein interfaceConnectorMetadata
-
renameColumn
public void renameColumn(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle source, String target)
- Specified by:
renameColumnin interfaceConnectorMetadata
-
dropColumn
public void dropColumn(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle column)
- Specified by:
dropColumnin interfaceConnectorMetadata
-
renameTable
public void renameTable(ConnectorSession session, ConnectorTableHandle tableHandle, SchemaTableName newTableName)
- Specified by:
renameTablein interfaceConnectorMetadata
-
setTableComment
public void setTableComment(ConnectorSession session, ConnectorTableHandle tableHandle, Optional<String> comment)
- Specified by:
setTableCommentin interfaceConnectorMetadata
-
setColumnComment
public void setColumnComment(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle column, Optional<String> comment)
- Specified by:
setColumnCommentin interfaceConnectorMetadata
-
beginCreateTable
public ConnectorOutputTableHandle beginCreateTable(ConnectorSession session, ConnectorTableMetadata tableMetadata, Optional<ConnectorNewTableLayout> layout)
- Specified by:
beginCreateTablein interfaceConnectorMetadata
-
finishCreateTable
public Optional<ConnectorOutputMetadata> finishCreateTable(ConnectorSession session, ConnectorOutputTableHandle tableHandle, Collection<io.airlift.slice.Slice> fragments, Collection<ComputedStatistics> computedStatistics)
- Specified by:
finishCreateTablein interfaceConnectorMetadata
-
beginQuery
public void beginQuery(ConnectorSession session)
- Specified by:
beginQueryin interfaceConnectorMetadata
-
cleanupQuery
public void cleanupQuery(ConnectorSession session)
- Specified by:
cleanupQueryin interfaceConnectorMetadata
-
beginInsert
public ConnectorInsertTableHandle beginInsert(ConnectorSession session, ConnectorTableHandle tableHandle)
- Specified by:
beginInsertin interfaceConnectorMetadata
-
beginInsert
public ConnectorInsertTableHandle beginInsert(ConnectorSession session, ConnectorTableHandle tableHandle, List<ColumnHandle> columns)
- Specified by:
beginInsertin interfaceConnectorMetadata
-
supportsMissingColumnsOnInsert
public boolean supportsMissingColumnsOnInsert()
- Specified by:
supportsMissingColumnsOnInsertin interfaceConnectorMetadata
-
finishInsert
public Optional<ConnectorOutputMetadata> finishInsert(ConnectorSession session, ConnectorInsertTableHandle insertHandle, Collection<io.airlift.slice.Slice> fragments, Collection<ComputedStatistics> computedStatistics)
- Specified by:
finishInsertin interfaceConnectorMetadata
-
beginRefreshMaterializedView
public ConnectorInsertTableHandle beginRefreshMaterializedView(ConnectorSession session, ConnectorTableHandle tableHandle, List<ConnectorTableHandle> sourceTableHandles)
- Specified by:
beginRefreshMaterializedViewin interfaceConnectorMetadata
-
finishRefreshMaterializedView
public Optional<ConnectorOutputMetadata> finishRefreshMaterializedView(ConnectorSession session, ConnectorTableHandle tableHandle, ConnectorInsertTableHandle insertHandle, Collection<io.airlift.slice.Slice> fragments, Collection<ComputedStatistics> computedStatistics, List<ConnectorTableHandle> sourceTableHandles)
- Specified by:
finishRefreshMaterializedViewin interfaceConnectorMetadata
-
getDeleteRowIdColumnHandle
public ColumnHandle getDeleteRowIdColumnHandle(ConnectorSession session, ConnectorTableHandle tableHandle)
- Specified by:
getDeleteRowIdColumnHandlein interfaceConnectorMetadata
-
createView
public void createView(ConnectorSession session, SchemaTableName viewName, ConnectorViewDefinition definition, boolean replace)
- Specified by:
createViewin interfaceConnectorMetadata
-
renameView
public void renameView(ConnectorSession session, SchemaTableName source, SchemaTableName target)
- Specified by:
renameViewin interfaceConnectorMetadata
-
setViewAuthorization
public void setViewAuthorization(ConnectorSession session, SchemaTableName viewName, TrinoPrincipal principal)
- Specified by:
setViewAuthorizationin interfaceConnectorMetadata
-
dropView
public void dropView(ConnectorSession session, SchemaTableName viewName)
- Specified by:
dropViewin interfaceConnectorMetadata
-
listViews
public List<SchemaTableName> listViews(ConnectorSession session, Optional<String> schemaName)
- Specified by:
listViewsin interfaceConnectorMetadata
-
getViews
public Map<SchemaTableName,ConnectorViewDefinition> getViews(ConnectorSession session, Optional<String> schemaName)
- Specified by:
getViewsin interfaceConnectorMetadata
-
getView
public Optional<ConnectorViewDefinition> getView(ConnectorSession session, SchemaTableName viewName)
- Specified by:
getViewin interfaceConnectorMetadata
-
getSchemaProperties
public Map<String,Object> getSchemaProperties(ConnectorSession session, CatalogSchemaName schemaName)
- Specified by:
getSchemaPropertiesin interfaceConnectorMetadata
-
getSchemaOwner
public Optional<TrinoPrincipal> getSchemaOwner(ConnectorSession session, CatalogSchemaName schemaName)
- Specified by:
getSchemaOwnerin interfaceConnectorMetadata
-
getUpdateRowIdColumnHandle
public ColumnHandle getUpdateRowIdColumnHandle(ConnectorSession session, ConnectorTableHandle tableHandle, List<ColumnHandle> updatedColumns)
- Specified by:
getUpdateRowIdColumnHandlein interfaceConnectorMetadata
-
beginDelete
public ConnectorTableHandle beginDelete(ConnectorSession session, ConnectorTableHandle tableHandle)
- Specified by:
beginDeletein interfaceConnectorMetadata
-
finishDelete
public void finishDelete(ConnectorSession session, ConnectorTableHandle tableHandle, Collection<io.airlift.slice.Slice> fragments)
- Specified by:
finishDeletein interfaceConnectorMetadata
-
supportsMetadataDelete
public boolean supportsMetadataDelete(ConnectorSession session, ConnectorTableHandle tableHandle, ConnectorTableLayoutHandle tableLayoutHandle)
- Specified by:
supportsMetadataDeletein interfaceConnectorMetadata
-
metadataDelete
public OptionalLong metadataDelete(ConnectorSession session, ConnectorTableHandle tableHandle, ConnectorTableLayoutHandle tableLayoutHandle)
- Specified by:
metadataDeletein interfaceConnectorMetadata
-
applyDelete
public Optional<ConnectorTableHandle> applyDelete(ConnectorSession session, ConnectorTableHandle handle)
- Specified by:
applyDeletein interfaceConnectorMetadata
-
executeDelete
public OptionalLong executeDelete(ConnectorSession session, ConnectorTableHandle handle)
- Specified by:
executeDeletein interfaceConnectorMetadata
-
resolveIndex
public Optional<ConnectorResolvedIndex> resolveIndex(ConnectorSession session, ConnectorTableHandle tableHandle, Set<ColumnHandle> indexableColumns, Set<ColumnHandle> outputColumns, TupleDomain<ColumnHandle> tupleDomain)
- Specified by:
resolveIndexin interfaceConnectorMetadata
-
createRole
public void createRole(ConnectorSession session, String role, Optional<TrinoPrincipal> grantor)
- Specified by:
createRolein interfaceConnectorMetadata
-
dropRole
public void dropRole(ConnectorSession session, String role)
- Specified by:
dropRolein interfaceConnectorMetadata
-
listRoles
public Set<String> listRoles(ConnectorSession session)
- Specified by:
listRolesin interfaceConnectorMetadata
-
listAllRoleGrants
public Set<RoleGrant> listAllRoleGrants(ConnectorSession session, Optional<Set<String>> roles, Optional<Set<String>> grantees, OptionalLong limit)
- Specified by:
listAllRoleGrantsin interfaceConnectorMetadata
-
listRoleGrants
public Set<RoleGrant> listRoleGrants(ConnectorSession session, TrinoPrincipal principal)
- Specified by:
listRoleGrantsin interfaceConnectorMetadata
-
grantRoles
public void grantRoles(ConnectorSession connectorSession, Set<String> roles, Set<TrinoPrincipal> grantees, boolean adminOption, Optional<TrinoPrincipal> grantor)
- Specified by:
grantRolesin interfaceConnectorMetadata
-
revokeRoles
public void revokeRoles(ConnectorSession connectorSession, Set<String> roles, Set<TrinoPrincipal> grantees, boolean adminOption, Optional<TrinoPrincipal> grantor)
- Specified by:
revokeRolesin interfaceConnectorMetadata
-
listApplicableRoles
public Set<RoleGrant> listApplicableRoles(ConnectorSession session, TrinoPrincipal principal)
- Specified by:
listApplicableRolesin interfaceConnectorMetadata
-
listEnabledRoles
public Set<String> listEnabledRoles(ConnectorSession session)
- Specified by:
listEnabledRolesin interfaceConnectorMetadata
-
grantSchemaPrivileges
public void grantSchemaPrivileges(ConnectorSession session, String schemaName, Set<Privilege> privileges, TrinoPrincipal grantee, boolean grantOption)
- Specified by:
grantSchemaPrivilegesin interfaceConnectorMetadata
-
revokeSchemaPrivileges
public void revokeSchemaPrivileges(ConnectorSession session, String schemaName, Set<Privilege> privileges, TrinoPrincipal grantee, boolean grantOption)
- Specified by:
revokeSchemaPrivilegesin interfaceConnectorMetadata
-
grantTablePrivileges
public void grantTablePrivileges(ConnectorSession session, SchemaTableName tableName, Set<Privilege> privileges, TrinoPrincipal grantee, boolean grantOption)
- Specified by:
grantTablePrivilegesin interfaceConnectorMetadata
-
revokeTablePrivileges
public void revokeTablePrivileges(ConnectorSession session, SchemaTableName tableName, Set<Privilege> privileges, TrinoPrincipal grantee, boolean grantOption)
- Specified by:
revokeTablePrivilegesin interfaceConnectorMetadata
-
listTablePrivileges
public List<GrantInfo> listTablePrivileges(ConnectorSession session, SchemaTablePrefix prefix)
- Specified by:
listTablePrivilegesin interfaceConnectorMetadata
-
usesLegacyTableLayouts
public boolean usesLegacyTableLayouts()
- Specified by:
usesLegacyTableLayoutsin interfaceConnectorMetadata
-
getTableProperties
public ConnectorTableProperties getTableProperties(ConnectorSession session, ConnectorTableHandle table)
- Specified by:
getTablePropertiesin interfaceConnectorMetadata
-
applyLimit
public Optional<LimitApplicationResult<ConnectorTableHandle>> applyLimit(ConnectorSession session, ConnectorTableHandle table, long limit)
- Specified by:
applyLimitin interfaceConnectorMetadata
-
applyFilter
public Optional<ConstraintApplicationResult<ConnectorTableHandle>> applyFilter(ConnectorSession session, ConnectorTableHandle table, Constraint constraint)
- Specified by:
applyFilterin interfaceConnectorMetadata
-
applyProjection
public Optional<ProjectionApplicationResult<ConnectorTableHandle>> applyProjection(ConnectorSession session, ConnectorTableHandle table, List<ConnectorExpression> projections, Map<String,ColumnHandle> assignments)
- Specified by:
applyProjectionin interfaceConnectorMetadata
-
applySample
public Optional<SampleApplicationResult<ConnectorTableHandle>> applySample(ConnectorSession session, ConnectorTableHandle table, SampleType sampleType, double sampleRatio)
- Specified by:
applySamplein interfaceConnectorMetadata
-
applyAggregation
public Optional<AggregationApplicationResult<ConnectorTableHandle>> applyAggregation(ConnectorSession session, ConnectorTableHandle table, List<AggregateFunction> aggregates, Map<String,ColumnHandle> assignments, List<List<ColumnHandle>> groupingSets)
- Specified by:
applyAggregationin interfaceConnectorMetadata
-
applyJoin
public Optional<JoinApplicationResult<ConnectorTableHandle>> applyJoin(ConnectorSession session, JoinType joinType, ConnectorTableHandle left, ConnectorTableHandle right, List<JoinCondition> joinConditions, Map<String,ColumnHandle> leftAssignments, Map<String,ColumnHandle> rightAssignments, JoinStatistics statistics)
- Specified by:
applyJoinin interfaceConnectorMetadata
-
applyTopN
public Optional<TopNApplicationResult<ConnectorTableHandle>> applyTopN(ConnectorSession session, ConnectorTableHandle table, long topNCount, List<SortItem> sortItems, Map<String,ColumnHandle> assignments)
- Specified by:
applyTopNin interfaceConnectorMetadata
-
validateScan
public void validateScan(ConnectorSession session, ConnectorTableHandle handle)
- Specified by:
validateScanin interfaceConnectorMetadata
-
createMaterializedView
public void createMaterializedView(ConnectorSession session, SchemaTableName viewName, ConnectorMaterializedViewDefinition definition, boolean replace, boolean ignoreExisting)
- Specified by:
createMaterializedViewin interfaceConnectorMetadata
-
dropMaterializedView
public void dropMaterializedView(ConnectorSession session, SchemaTableName viewName)
- Specified by:
dropMaterializedViewin interfaceConnectorMetadata
-
getMaterializedView
public Optional<ConnectorMaterializedViewDefinition> getMaterializedView(ConnectorSession session, SchemaTableName viewName)
- Specified by:
getMaterializedViewin interfaceConnectorMetadata
-
getMaterializedViewFreshness
public MaterializedViewFreshness getMaterializedViewFreshness(ConnectorSession session, SchemaTableName name)
- Specified by:
getMaterializedViewFreshnessin interfaceConnectorMetadata
-
applyTableScanRedirect
public Optional<TableScanRedirectApplicationResult> applyTableScanRedirect(ConnectorSession session, ConnectorTableHandle tableHandle)
- Specified by:
applyTableScanRedirectin interfaceConnectorMetadata
-
beginUpdate
public ConnectorTableHandle beginUpdate(ConnectorSession session, ConnectorTableHandle tableHandle, List<ColumnHandle> updatedColumns)
- Specified by:
beginUpdatein interfaceConnectorMetadata
-
finishUpdate
public void finishUpdate(ConnectorSession session, ConnectorTableHandle tableHandle, Collection<io.airlift.slice.Slice> fragments)
- Specified by:
finishUpdatein interfaceConnectorMetadata
-
redirectTable
public Optional<CatalogSchemaTableName> redirectTable(ConnectorSession session, SchemaTableName tableName)
- Specified by:
redirectTablein interfaceConnectorMetadata
-
-