Package io.prestosql.metadata
Interface Metadata
-
- All Known Implementing Classes:
MetadataManager
public interface Metadata
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
addColumn(Session session, TableHandle tableHandle, ColumnMetadata column)
Add the specified column to the table.void
addFunctions(List<? extends SqlFunction> functions)
Optional<AggregationApplicationResult<TableHandle>>
applyAggregation(Session session, TableHandle table, List<AggregateFunction> aggregations, Map<String,ColumnHandle> assignments, List<List<ColumnHandle>> groupingSets)
Optional<TableHandle>
applyDelete(Session session, TableHandle tableHandle)
Push delete into connectorOptional<ConstraintApplicationResult<TableHandle>>
applyFilter(Session session, TableHandle table, Constraint constraint)
Optional<LimitApplicationResult<TableHandle>>
applyLimit(Session session, TableHandle table, long limit)
Optional<ProjectionApplicationResult<TableHandle>>
applyProjection(Session session, TableHandle table, List<ConnectorExpression> projections, Map<String,ColumnHandle> assignments)
Optional<TableHandle>
applySample(Session session, TableHandle table, SampleType sampleType, double sampleRatio)
Optional<TopNApplicationResult<TableHandle>>
applyTopN(Session session, TableHandle handle, long topNCount, List<SortItem> sortItems, Map<String,ColumnHandle> assignments)
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 queryInsertTableHandle
beginInsert(Session session, TableHandle tableHandle, List<ColumnHandle> columns)
Begin insert queryInsertTableHandle
beginRefreshMaterializedView(Session session, TableHandle tableHandle)
Begin refresh materialized view queryAnalyzeTableHandle
beginStatisticsCollection(Session session, TableHandle tableHandle)
Begin statistics collectionboolean
catalogExists(Session session, String catalogName)
void
cleanupQuery(Session session)
Cleanup after a query.void
createMaterializedView(Session session, QualifiedObjectName viewName, ConnectorMaterializedViewDefinition definition, boolean replace, 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, PrestoPrincipal principal)
Creates a schema.void
createTable(Session session, String catalogName, ConnectorTableMetadata tableMetadata, boolean ignoreExisting)
Creates a table using the specified table metadata.void
createView(Session session, QualifiedObjectName viewName, ConnectorViewDefinition definition, boolean replace)
Creates the specified view with the specified view definition.ResolvedFunction
decodeFunction(QualifiedName name)
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 tablevoid
dropView(Session session, QualifiedObjectName viewName)
Drops the specified view.OptionalLong
executeDelete(Session session, TableHandle tableHandle)
Execute delete in connectorOptional<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 queryOptional<ConnectorOutputMetadata>
finishInsert(Session session, InsertTableHandle tableHandle, Collection<io.airlift.slice.Slice> fragments, Collection<ComputedStatistics> computedStatistics)
Finish insert queryOptional<ConnectorOutputMetadata>
finishRefreshMaterializedView(Session session, InsertTableHandle tableHandle, Collection<io.airlift.slice.Slice> fragments, Collection<ComputedStatistics> computedStatistics, List<TableHandle> sourceTableHandles)
Finish refresh materialized view queryvoid
finishStatisticsCollection(Session session, AnalyzeTableHandle tableHandle, Collection<ComputedStatistics> computedStatistics)
Finish statistics collectionType
fromSqlType(String sqlType)
InternalAggregationFunction
getAggregateFunctionImplementation(ResolvedFunction resolvedFunction)
AggregationFunctionMetadata
getAggregationFunctionMetadata(ResolvedFunction resolvedFunction)
AnalyzePropertyManager
getAnalyzePropertyManager()
BlockEncoding
getBlockEncoding(String encodingName)
BlockEncodingSerde
getBlockEncodingSerde()
Optional<CatalogName>
getCatalogHandle(Session session, String catalogName)
Returns a connector id for the specified catalog name.Map<String,CatalogName>
getCatalogNames(Session session)
Gets all the loaded catalogsResolvedFunction
getCoercion(OperatorType operatorType, Type fromType, Type toType)
default ResolvedFunction
getCoercion(Type fromType, Type toType)
ResolvedFunction
getCoercion(QualifiedName name, Type fromType, Type toType)
Map<String,ColumnHandle>
getColumnHandles(Session session, TableHandle tableHandle)
Gets all of the columns on the specified table, or an empty map if the columns cannot 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 bothleft
andright
into.Set<ConnectorCapabilities>
getConnectorCapabilities(Session session, CatalogName catalogName)
FunctionMetadata
getFunctionMetadata(ResolvedFunction resolvedFunction)
Optional<Object>
getInfo(Session session, TableHandle handle)
Optional<NewTableLayout>
getInsertLayout(Session session, TableHandle target)
Optional<TableLayoutResult>
getLayout(Session session, TableHandle tableHandle, Constraint constraint, Optional<Set<ColumnHandle>> desiredColumns)
Deprecated.Optional<ConnectorMaterializedViewDefinition>
getMaterializedView(Session session, QualifiedObjectName viewName)
Returns the materialized view definition for the specified view name.MaterializedViewFreshness
getMaterializedViewFreshness(Session session, TableHandle tableHandle)
Method to get difference between the states of table at two different points in time/or as of given token-ids.Optional<NewTableLayout>
getNewTableLayout(Session session, String catalogName, ConnectorTableMetadata tableMetadata)
default Type
getParameterizedType(String baseTypeName, List<TypeSignatureParameter> typeParameters)
Collection<ParametricType>
getParametricTypes()
ProcedureRegistry
getProcedureRegistry()
FunctionInvoker
getScalarFunctionInvoker(ResolvedFunction resolvedFunction, Optional<InvocationConvention> invocationConvention)
Optional<PrestoPrincipal>
getSchemaOwner(Session session, CatalogSchemaName schemaName)
Gets the schema owner for the specified schema.Map<String,Object>
getSchemaProperties(Session session, CatalogSchemaName schemaName)
Gets the schema properties for the specified schema.SchemaPropertyManager
getSchemaPropertyManager()
SessionPropertyManager
getSessionPropertyManager()
TableStatisticsMetadata
getStatisticsCollectionMetadata(Session session, String catalogName, ConnectorTableMetadata tableMetadata)
Describe statistics that must be collected during a statistics collectionTableStatisticsMetadata
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 tableName)
Returns a table handle for the specified table name.Optional<TableHandle>
getTableHandleForStatisticsCollection(Session session, QualifiedObjectName tableName, Map<String,Object> analyzeProperties)
TableMetadata
getTableMetadata(Session session, TableHandle tableHandle)
Return the metadata for the specified table handle.TableProperties
getTableProperties(Session session, TableHandle handle)
TablePropertyManager
getTablePropertyManager()
TableStatistics
getTableStatistics(Session session, TableHandle tableHandle, Constraint constraint)
Return statistics for specified table for given filtering contraint.Type
getType(TypeId id)
Type
getType(TypeSignature signature)
Collection<Type>
getTypes()
ColumnHandle
getUpdateRowIdColumnHandle(Session session, TableHandle tableHandle)
Get the row ID column handle used with UpdatablePageSource.Optional<ConnectorViewDefinition>
getView(Session session, QualifiedObjectName viewName)
Returns the view definition for the specified view name.Map<QualifiedObjectName,ConnectorViewDefinition>
getViews(Session session, QualifiedTablePrefix prefix)
Get the view definitions that match the specified table prefix (never null).WindowFunctionSupplier
getWindowFunctionImplementation(ResolvedFunction resolvedFunction)
void
grantRoles(Session session, Set<String> roles, Set<PrestoPrincipal> grantees, boolean adminOption, Optional<PrestoPrincipal> grantor, String catalog)
Grants the specified roles to the specified grantees in the specified catalogvoid
grantTablePrivileges(Session session, QualifiedObjectName tableName, Set<Privilege> privileges, PrestoPrincipal grantee, boolean grantOption)
Grants the specified privilege to the specified user on the specified tableboolean
isAggregationFunction(QualifiedName name)
Is the named function an aggregation function? This does not need type parameters because overloads between aggregation and other function types are not allowed.Set<RoleGrant>
listAllRoleGrants(Session session, String catalog, Optional<Set<String>> roles, Optional<Set<String>> grantees, OptionalLong limit)
List all role grants in the specified catalog, optionally filtered by passed role, grantee, and limit predicates.Set<RoleGrant>
listApplicableRoles(Session session, PrestoPrincipal principal, String catalog)
List applicable roles, including the transitive grants, for the specified principalSet<String>
listEnabledRoles(Session session, String catalog)
List applicable roles, including the transitive grants, in given sessionList<FunctionMetadata>
listFunctions()
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 roleList<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).TableHandle
makeCompatiblePartitioning(Session session, TableHandle table, PartitioningHandle partitioningHandle)
Return a table handle whose partitioning is converted to the provided partitioning handle, but otherwise identical to the provided table handle.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.void
renameView(Session session, QualifiedObjectName existingViewName, QualifiedObjectName newViewName)
Rename the specified view.ResolvedFunction
resolveFunction(QualifiedName name, List<TypeSignatureProvider> parameterTypes)
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.ResolvedFunction
resolveOperator(OperatorType operatorType, List<? extends Type> argumentTypes)
void
revokeRoles(Session session, Set<String> roles, Set<PrestoPrincipal> grantees, boolean adminOption, Optional<PrestoPrincipal> grantor, String catalog)
Revokes the specified roles from the specified grantees in the specified catalogvoid
revokeTablePrivileges(Session session, QualifiedObjectName tableName, Set<Privilege> privileges, PrestoPrincipal grantee, boolean grantOption)
Revokes the specified privilege on the specified table from the specified userboolean
schemaExists(Session session, CatalogSchemaName schema)
void
setColumnComment(Session session, TableHandle tableHandle, ColumnHandle column, Optional<String> comment)
Comments to the specified column.void
setSchemaAuthorization(Session session, CatalogSchemaName source, PrestoPrincipal principal)
Set the specified schema's user/role.void
setTableComment(Session session, TableHandle tableHandle, Optional<String> comment)
Comments to the specified table.boolean
supportsMetadataDelete(Session session, TableHandle tableHandle)
boolean
supportsMissingColumnsOnInsert(Session session, TableHandle tableHandle)
boolean
usesLegacyTableLayouts(Session session, TableHandle table)
Deprecated.default void
validateScan(Session session, TableHandle table)
void
verifyTypes()
-
-
-
Method Detail
-
getConnectorCapabilities
Set<ConnectorCapabilities> getConnectorCapabilities(Session session, CatalogName catalogName)
-
schemaExists
boolean schemaExists(Session session, CatalogSchemaName schema)
-
getTableHandle
Optional<TableHandle> getTableHandle(Session session, QualifiedObjectName tableName)
Returns a table handle for the specified table name.
-
getSystemTable
Optional<SystemTable> getSystemTable(Session session, QualifiedObjectName tableName)
-
getTableHandleForStatisticsCollection
Optional<TableHandle> getTableHandleForStatisticsCollection(Session session, QualifiedObjectName tableName, Map<String,Object> analyzeProperties)
-
getLayout
@Deprecated Optional<TableLayoutResult> getLayout(Session session, TableHandle tableHandle, Constraint constraint, Optional<Set<ColumnHandle>> desiredColumns)
Deprecated.
-
getTableProperties
TableProperties getTableProperties(Session session, TableHandle handle)
-
makeCompatiblePartitioning
TableHandle makeCompatiblePartitioning(Session session, TableHandle table, PartitioningHandle partitioningHandle)
Return a table handle whose partitioning is converted to the provided partitioning handle, but otherwise identical to the provided table handle. The provided table handle must be one that the connector can transparently convert to from the original partitioning handle associated with the provided table handle, as promised bygetCommonPartitioning(io.prestosql.Session, io.prestosql.sql.planner.PartitioningHandle, io.prestosql.sql.planner.PartitioningHandle)
.
-
getCommonPartitioning
Optional<PartitioningHandle> getCommonPartitioning(Session session, PartitioningHandle left, PartitioningHandle right)
Return a partitioning handle which the connector can transparently convert bothleft
andright
into.
-
getInfo
Optional<Object> getInfo(Session session, TableHandle handle)
-
getTableMetadata
TableMetadata getTableMetadata(Session session, TableHandle tableHandle)
Return the metadata for the specified table handle.- Throws:
RuntimeException
- if table handle is no longer valid
-
getTableStatistics
TableStatistics getTableStatistics(Session session, TableHandle tableHandle, Constraint constraint)
Return statistics for specified table for given filtering contraint.
-
listTables
List<QualifiedObjectName> listTables(Session session, QualifiedTablePrefix prefix)
Get the names that match the specified table prefix (never null).
-
getColumnHandles
Map<String,ColumnHandle> getColumnHandles(Session session, TableHandle tableHandle)
Gets all of the columns on the specified table, or an empty map if the columns cannot be enumerated.- Throws:
RuntimeException
- if table handle is no longer valid
-
getColumnMetadata
ColumnMetadata getColumnMetadata(Session session, TableHandle tableHandle, ColumnHandle columnHandle)
Gets the metadata for the specified table column.- Throws:
RuntimeException
- if table or column handles are no longer valid
-
listTableColumns
Map<QualifiedObjectName,List<ColumnMetadata>> listTableColumns(Session session, QualifiedTablePrefix prefix)
Gets the metadata for all columns that match the specified table prefix.
-
createSchema
void createSchema(Session session, CatalogSchemaName schema, Map<String,Object> properties, PrestoPrincipal principal)
Creates a schema.- Parameters:
principal
- TODO
-
dropSchema
void dropSchema(Session session, CatalogSchemaName schema)
Drops the specified schema.
-
renameSchema
void renameSchema(Session session, CatalogSchemaName source, String target)
Renames the specified schema.
-
setSchemaAuthorization
void setSchemaAuthorization(Session session, CatalogSchemaName source, PrestoPrincipal principal)
Set the specified schema's user/role.
-
createTable
void createTable(Session session, String catalogName, ConnectorTableMetadata tableMetadata, boolean ignoreExisting)
Creates a table using the specified table metadata.- Throws:
PrestoException
- withALREADY_EXISTS
if the table already exists and {@param ignoreExisting} is not set
-
renameTable
void renameTable(Session session, TableHandle tableHandle, QualifiedObjectName newTableName)
Rename the specified table.
-
setTableComment
void setTableComment(Session session, TableHandle tableHandle, Optional<String> comment)
Comments to the specified table.
-
setColumnComment
void setColumnComment(Session session, TableHandle tableHandle, ColumnHandle column, Optional<String> comment)
Comments to the specified column.
-
renameColumn
void renameColumn(Session session, TableHandle tableHandle, ColumnHandle source, String target)
Rename the specified column.
-
addColumn
void addColumn(Session session, TableHandle tableHandle, ColumnMetadata column)
Add the specified column to the table.
-
dropColumn
void dropColumn(Session session, TableHandle tableHandle, ColumnHandle column)
Drop the specified column.
-
dropTable
void dropTable(Session session, TableHandle tableHandle)
Drops the specified table- Throws:
RuntimeException
- if the table cannot be dropped or table handle is no longer valid
-
getNewTableLayout
Optional<NewTableLayout> getNewTableLayout(Session session, String catalogName, ConnectorTableMetadata tableMetadata)
-
beginCreateTable
OutputTableHandle beginCreateTable(Session session, String catalogName, ConnectorTableMetadata tableMetadata, Optional<NewTableLayout> layout)
Begin the atomic creation of a table with data.
-
finishCreateTable
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.
-
getInsertLayout
Optional<NewTableLayout> getInsertLayout(Session session, TableHandle target)
-
getStatisticsCollectionMetadataForWrite
TableStatisticsMetadata getStatisticsCollectionMetadataForWrite(Session session, String catalogName, ConnectorTableMetadata tableMetadata)
Describes statistics that must be collected during a write.
-
getStatisticsCollectionMetadata
TableStatisticsMetadata getStatisticsCollectionMetadata(Session session, String catalogName, ConnectorTableMetadata tableMetadata)
Describe statistics that must be collected during a statistics collection
-
beginStatisticsCollection
AnalyzeTableHandle beginStatisticsCollection(Session session, TableHandle tableHandle)
Begin statistics collection
-
finishStatisticsCollection
void finishStatisticsCollection(Session session, AnalyzeTableHandle tableHandle, Collection<ComputedStatistics> computedStatistics)
Finish statistics collection
-
cleanupQuery
void cleanupQuery(Session session)
Cleanup after a query. This is the very last notification after the query finishes, regardless if it succeeds or fails. An exception thrown in this method will not affect the result of the query.
-
beginInsert
InsertTableHandle beginInsert(Session session, TableHandle tableHandle, List<ColumnHandle> columns)
Begin insert query
-
supportsMissingColumnsOnInsert
boolean supportsMissingColumnsOnInsert(Session session, TableHandle tableHandle)
- Returns:
- whether connector handles missing columns during insert
-
finishInsert
Optional<ConnectorOutputMetadata> finishInsert(Session session, InsertTableHandle tableHandle, Collection<io.airlift.slice.Slice> fragments, Collection<ComputedStatistics> computedStatistics)
Finish insert query
-
beginRefreshMaterializedView
InsertTableHandle beginRefreshMaterializedView(Session session, TableHandle tableHandle)
Begin refresh materialized view query
-
finishRefreshMaterializedView
Optional<ConnectorOutputMetadata> finishRefreshMaterializedView(Session session, InsertTableHandle tableHandle, Collection<io.airlift.slice.Slice> fragments, Collection<ComputedStatistics> computedStatistics, List<TableHandle> sourceTableHandles)
Finish refresh materialized view query
-
getUpdateRowIdColumnHandle
ColumnHandle getUpdateRowIdColumnHandle(Session session, TableHandle tableHandle)
Get the row ID column handle used with UpdatablePageSource.
-
supportsMetadataDelete
boolean supportsMetadataDelete(Session session, TableHandle tableHandle)
- Returns:
- whether delete without table scan is supported
-
applyDelete
Optional<TableHandle> applyDelete(Session session, TableHandle tableHandle)
Push delete into connector
-
executeDelete
OptionalLong executeDelete(Session session, TableHandle tableHandle)
Execute delete in connector
-
beginDelete
TableHandle beginDelete(Session session, TableHandle tableHandle)
Begin delete query
-
finishDelete
void finishDelete(Session session, TableHandle tableHandle, Collection<io.airlift.slice.Slice> fragments)
Finish delete query
-
getCatalogHandle
Optional<CatalogName> getCatalogHandle(Session session, String catalogName)
Returns a connector id for the specified catalog name.
-
getCatalogNames
Map<String,CatalogName> getCatalogNames(Session session)
Gets all the loaded catalogs- Returns:
- Map of catalog name to connector id
-
listViews
List<QualifiedObjectName> listViews(Session session, QualifiedTablePrefix prefix)
Get the names that match the specified table prefix (never null).
-
getViews
Map<QualifiedObjectName,ConnectorViewDefinition> getViews(Session session, QualifiedTablePrefix prefix)
Get the view definitions that match the specified table prefix (never null).
-
getView
Optional<ConnectorViewDefinition> getView(Session session, QualifiedObjectName viewName)
Returns the view definition for the specified view name.
-
getSchemaProperties
Map<String,Object> getSchemaProperties(Session session, CatalogSchemaName schemaName)
Gets the schema properties for the specified schema.
-
getSchemaOwner
Optional<PrestoPrincipal> getSchemaOwner(Session session, CatalogSchemaName schemaName)
Gets the schema owner for the specified schema.
-
createView
void createView(Session session, QualifiedObjectName viewName, ConnectorViewDefinition definition, boolean replace)
Creates the specified view with the specified view definition.
-
renameView
void renameView(Session session, QualifiedObjectName existingViewName, QualifiedObjectName newViewName)
Rename the specified view.
-
dropView
void dropView(Session session, QualifiedObjectName viewName)
Drops the specified view.
-
resolveIndex
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.
-
usesLegacyTableLayouts
@Deprecated boolean usesLegacyTableLayouts(Session session, TableHandle table)
Deprecated.
-
applyLimit
Optional<LimitApplicationResult<TableHandle>> applyLimit(Session session, TableHandle table, long limit)
-
applyFilter
Optional<ConstraintApplicationResult<TableHandle>> applyFilter(Session session, TableHandle table, Constraint constraint)
-
applyProjection
Optional<ProjectionApplicationResult<TableHandle>> applyProjection(Session session, TableHandle table, List<ConnectorExpression> projections, Map<String,ColumnHandle> assignments)
-
applySample
Optional<TableHandle> applySample(Session session, TableHandle table, SampleType sampleType, double sampleRatio)
-
applyAggregation
Optional<AggregationApplicationResult<TableHandle>> applyAggregation(Session session, TableHandle table, List<AggregateFunction> aggregations, Map<String,ColumnHandle> assignments, List<List<ColumnHandle>> groupingSets)
-
applyTopN
Optional<TopNApplicationResult<TableHandle>> applyTopN(Session session, TableHandle handle, long topNCount, List<SortItem> sortItems, Map<String,ColumnHandle> assignments)
-
validateScan
default void validateScan(Session session, TableHandle table)
-
createRole
void createRole(Session session, String role, Optional<PrestoPrincipal> grantor, String catalog)
Creates the specified role in the specified catalog.- Parameters:
grantor
- represents the principal specified by WITH ADMIN statement
-
dropRole
void dropRole(Session session, String role, String catalog)
Drops the specified role in the specified catalog.
-
listRoles
Set<String> listRoles(Session session, String catalog)
List available roles in specified catalog.
-
listAllRoleGrants
Set<RoleGrant> listAllRoleGrants(Session session, String catalog, Optional<Set<String>> roles, Optional<Set<String>> grantees, OptionalLong limit)
List all role grants in the specified catalog, optionally filtered by passed role, grantee, and limit predicates.
-
listRoleGrants
Set<RoleGrant> listRoleGrants(Session session, String catalog, PrestoPrincipal principal)
List roles grants in the specified catalog for a given principal, not recursively.
-
grantRoles
void grantRoles(Session session, Set<String> roles, Set<PrestoPrincipal> grantees, boolean adminOption, Optional<PrestoPrincipal> grantor, String catalog)
Grants the specified roles to the specified grantees in the specified catalog- Parameters:
grantor
- represents the principal specified by GRANTED BY statement
-
revokeRoles
void revokeRoles(Session session, Set<String> roles, Set<PrestoPrincipal> grantees, boolean adminOption, Optional<PrestoPrincipal> grantor, String catalog)
Revokes the specified roles from the specified grantees in the specified catalog- Parameters:
grantor
- represents the principal specified by GRANTED BY statement
-
listApplicableRoles
Set<RoleGrant> listApplicableRoles(Session session, PrestoPrincipal principal, String catalog)
List applicable roles, including the transitive grants, for the specified principal
-
listEnabledRoles
Set<String> listEnabledRoles(Session session, String catalog)
List applicable roles, including the transitive grants, in given session
-
grantTablePrivileges
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
-
revokeTablePrivileges
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
-
listTablePrivileges
List<GrantInfo> listTablePrivileges(Session session, QualifiedTablePrefix prefix)
Gets the privileges for the specified table available to the given grantee considering the selected session role
-
getType
Type getType(TypeSignature signature)
-
getParameterizedType
default Type getParameterizedType(String baseTypeName, List<TypeSignatureParameter> typeParameters)
-
getTypes
Collection<Type> getTypes()
-
getParametricTypes
Collection<ParametricType> getParametricTypes()
-
verifyTypes
void verifyTypes()
-
addFunctions
void addFunctions(List<? extends SqlFunction> functions)
-
listFunctions
List<FunctionMetadata> listFunctions()
-
decodeFunction
ResolvedFunction decodeFunction(QualifiedName name)
-
resolveFunction
ResolvedFunction resolveFunction(QualifiedName name, List<TypeSignatureProvider> parameterTypes)
-
resolveOperator
ResolvedFunction resolveOperator(OperatorType operatorType, List<? extends Type> argumentTypes) throws OperatorNotFoundException
- Throws:
OperatorNotFoundException
-
getCoercion
default ResolvedFunction getCoercion(Type fromType, Type toType)
-
getCoercion
ResolvedFunction getCoercion(OperatorType operatorType, Type fromType, Type toType)
-
getCoercion
ResolvedFunction getCoercion(QualifiedName name, Type fromType, Type toType)
-
isAggregationFunction
boolean isAggregationFunction(QualifiedName name)
Is the named function an aggregation function? This does not need type parameters because overloads between aggregation and other function types are not allowed.
-
getFunctionMetadata
FunctionMetadata getFunctionMetadata(ResolvedFunction resolvedFunction)
-
getAggregationFunctionMetadata
AggregationFunctionMetadata getAggregationFunctionMetadata(ResolvedFunction resolvedFunction)
-
getWindowFunctionImplementation
WindowFunctionSupplier getWindowFunctionImplementation(ResolvedFunction resolvedFunction)
-
getAggregateFunctionImplementation
InternalAggregationFunction getAggregateFunctionImplementation(ResolvedFunction resolvedFunction)
-
getScalarFunctionInvoker
FunctionInvoker getScalarFunctionInvoker(ResolvedFunction resolvedFunction, Optional<InvocationConvention> invocationConvention)
-
getProcedureRegistry
ProcedureRegistry getProcedureRegistry()
-
getBlockEncoding
BlockEncoding getBlockEncoding(String encodingName)
-
getBlockEncodingSerde
BlockEncodingSerde getBlockEncodingSerde()
-
getSessionPropertyManager
SessionPropertyManager getSessionPropertyManager()
-
getSchemaPropertyManager
SchemaPropertyManager getSchemaPropertyManager()
-
getTablePropertyManager
TablePropertyManager getTablePropertyManager()
-
getColumnPropertyManager
ColumnPropertyManager getColumnPropertyManager()
-
getAnalyzePropertyManager
AnalyzePropertyManager getAnalyzePropertyManager()
-
createMaterializedView
void createMaterializedView(Session session, QualifiedObjectName viewName, ConnectorMaterializedViewDefinition definition, boolean replace, boolean ignoreExisting)
Creates the specified materialized view with the specified view definition.
-
dropMaterializedView
void dropMaterializedView(Session session, QualifiedObjectName viewName)
Drops the specified materialized view.
-
getMaterializedView
Optional<ConnectorMaterializedViewDefinition> getMaterializedView(Session session, QualifiedObjectName viewName)
Returns the materialized view definition for the specified view name.
-
getMaterializedViewFreshness
MaterializedViewFreshness getMaterializedViewFreshness(Session session, TableHandle tableHandle)
Method to get difference between the states of table at two different points in time/or as of given token-ids. The method is used by the engine to determine if a materialized view is current with respect to the tables it depends on.
-
-