Package io.prestosql.plugin.tpch
Class TpchMetadata
- java.lang.Object
-
- io.prestosql.plugin.tpch.TpchMetadata
-
- All Implemented Interfaces:
ConnectorMetadata
public class TpchMetadata extends Object implements ConnectorMetadata
-
-
Field Summary
Fields Modifier and Type Field Description static StringROW_NUMBER_COLUMN_NAMEstatic List<String>SCHEMA_NAMESstatic doubleTINY_SCALE_FACTORstatic StringTINY_SCHEMA_NAME
-
Constructor Summary
Constructors Constructor Description TpchMetadata()TpchMetadata(ColumnNaming columnNaming, boolean predicatePushdownEnabled, boolean partitioningEnabled, Optional<String> destinationCatalog, Optional<String> destinationSchema)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.prestosql.spi.connector.ConnectorMetadata
addColumn, applyAggregation, applyDelete, applyLimit, applyProjection, applySample, applyTopN, beginCreateTable, beginDelete, beginInsert, beginInsert, beginQuery, beginRefreshMaterializedView, cleanupQuery, createMaterializedView, createRole, createSchema, createTable, createView, dropColumn, dropMaterializedView, dropRole, dropSchema, dropTable, dropView, executeDelete, finishCreateTable, finishDelete, finishInsert, finishRefreshMaterializedView, getCommonPartitioningHandle, getInfo, getInfo, getInsertLayout, getMaterializedView, getMaterializedViewFreshness, getNewTableLayout, getSchemaOwner, getSchemaProperties, getStatisticsCollectionMetadataForWrite, getSystemTable, getTableLayout, getTableLayouts, getUpdateRowIdColumnHandle, getView, getViews, grantRoles, grantSchemaPrivileges, grantTablePrivileges, listAllRoleGrants, listApplicableRoles, listEnabledRoles, listRoleGrants, listRoles, listTablePrivileges, listViews, makeCompatiblePartitioning, makeCompatiblePartitioning, metadataDelete, renameColumn, renameSchema, renameTable, renameView, resolveIndex, revokeRoles, revokeSchemaPrivileges, revokeTablePrivileges, setColumnComment, setSchemaAuthorization, setTableAuthorization, setTableComment, setViewAuthorization, supportsMetadataDelete, supportsMissingColumnsOnInsert, validateScan
-
-
-
-
Field Detail
-
TINY_SCHEMA_NAME
public static final String TINY_SCHEMA_NAME
- See Also:
- Constant Field Values
-
TINY_SCALE_FACTOR
public static final double TINY_SCALE_FACTOR
- See Also:
- Constant Field Values
-
ROW_NUMBER_COLUMN_NAME
public static final String ROW_NUMBER_COLUMN_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TpchMetadata
public TpchMetadata()
-
TpchMetadata
public TpchMetadata(ColumnNaming columnNaming, boolean predicatePushdownEnabled, boolean partitioningEnabled, Optional<String> destinationCatalog, Optional<String> destinationSchema)
-
-
Method Detail
-
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 TpchTableHandle 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
-
getTableMetadata
public ConnectorTableMetadata getTableMetadata(ConnectorSession session, ConnectorTableHandle tableHandle)
- Specified by:
getTableMetadatain interfaceConnectorMetadata
-
getColumnHandles
public Map<String,ColumnHandle> getColumnHandles(ConnectorSession session, ConnectorTableHandle tableHandle)
- Specified by:
getColumnHandlesin interfaceConnectorMetadata
-
listTableColumns
public Map<SchemaTableName,List<ColumnMetadata>> listTableColumns(ConnectorSession session, SchemaTablePrefix prefix)
- Specified by:
listTableColumnsin interfaceConnectorMetadata
-
getTableStatistics
public TableStatistics getTableStatistics(ConnectorSession session, ConnectorTableHandle tableHandle, Constraint constraint)
- Specified by:
getTableStatisticsin 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
-
getColumnMetadata
public ColumnMetadata getColumnMetadata(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle columnHandle)
- Specified by:
getColumnMetadatain interfaceConnectorMetadata
-
listTables
public List<SchemaTableName> listTables(ConnectorSession session, Optional<String> filterSchema)
- Specified by:
listTablesin interfaceConnectorMetadata
-
usesLegacyTableLayouts
public boolean usesLegacyTableLayouts()
- Specified by:
usesLegacyTableLayoutsin interfaceConnectorMetadata
-
getTableProperties
public ConnectorTableProperties getTableProperties(ConnectorSession session, ConnectorTableHandle table)
- Specified by:
getTablePropertiesin interfaceConnectorMetadata
-
applyFilter
public Optional<ConstraintApplicationResult<ConnectorTableHandle>> applyFilter(ConnectorSession session, ConnectorTableHandle table, Constraint constraint)
- Specified by:
applyFilterin interfaceConnectorMetadata
-
applyTableScanRedirect
public Optional<TableScanRedirectApplicationResult> applyTableScanRedirect(ConnectorSession session, ConnectorTableHandle table)
- Specified by:
applyTableScanRedirectin interfaceConnectorMetadata
-
schemaNameToScaleFactor
public static double schemaNameToScaleFactor(String schemaName)
-
getPrestoType
public static Type getPrestoType(io.prestosql.tpch.TpchColumn<?> column)
-
-