Package io.trino.plugin.bigquery
Class BigQueryMetadata
java.lang.Object
io.trino.plugin.bigquery.BigQueryMetadata
- All Implemented Interfaces:
ConnectorMetadata
-
Field Summary
Fields inherited from interface io.trino.spi.connector.ConnectorMetadata
MODIFYING_ROWS_MESSAGE -
Constructor Summary
ConstructorsConstructorDescriptionBigQueryMetadata(BigQueryClientFactory bigQueryClientFactory, com.google.common.util.concurrent.ListeningExecutorService executorService) -
Method Summary
Modifier and TypeMethodDescriptionapplyDelete(ConnectorSession session, ConnectorTableHandle handle) applyFilter(ConnectorSession session, ConnectorTableHandle handle, Constraint constraint) applyProjection(ConnectorSession session, ConnectorTableHandle handle, List<ConnectorExpression> projections, Map<String, ColumnHandle> assignments) applyTableFunction(ConnectorSession session, ConnectorTableFunctionHandle handle) beginCreateTable(ConnectorSession session, ConnectorTableMetadata tableMetadata, Optional<ConnectorTableLayout> layout, RetryMode retryMode) beginInsert(ConnectorSession session, ConnectorTableHandle tableHandle, List<ColumnHandle> columns, RetryMode retryMode) beginMerge(ConnectorSession session, ConnectorTableHandle tableHandle, RetryMode retryMode) voidcreateMaterializedView(ConnectorSession session, SchemaTableName viewName, ConnectorMaterializedViewDefinition definition, boolean replace, boolean ignoreExisting) voidcreateSchema(ConnectorSession session, String schemaName, Map<String, Object> properties, TrinoPrincipal owner) voidcreateTable(ConnectorSession session, ConnectorTableMetadata tableMetadata, boolean ignoreExisting) voiddropSchema(ConnectorSession session, String schemaName) voiddropTable(ConnectorSession session, ConnectorTableHandle tableHandle) executeDelete(ConnectorSession session, ConnectorTableHandle handle) finishCreateTable(ConnectorSession session, ConnectorOutputTableHandle tableHandle, Collection<io.airlift.slice.Slice> fragments, Collection<ComputedStatistics> computedStatistics) finishInsert(ConnectorSession session, ConnectorInsertTableHandle insertHandle, Collection<io.airlift.slice.Slice> fragments, Collection<ComputedStatistics> computedStatistics) getColumnHandles(ConnectorSession session, ConnectorTableHandle tableHandle) getColumnMetadata(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle columnHandle) getStatisticsCollectionMetadata(ConnectorSession session, ConnectorTableHandle tableHandle, Map<String, Object> analyzeProperties) getSystemTable(ConnectorSession session, SchemaTableName tableName) getTableHandle(ConnectorSession session, SchemaTableName schemaTableName) getTableMetadata(ConnectorSession session, ConnectorTableHandle tableHandle) listSchemaNames(ConnectorSession session) listTableColumns(ConnectorSession session, SchemaTablePrefix prefix) listTables(ConnectorSession session, Optional<String> schemaName) protected <T,R> Stream<R> processInParallel(List<T> list, Function<T, R> function) voidrollback()booleanschemaExists(ConnectorSession session, String schemaName) voidsetColumnComment(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle columnHandle, Optional<String> newComment) voidsetTableComment(ConnectorSession session, ConnectorTableHandle tableHandle, Optional<String> newComment) booleanvoidtruncateTable(ConnectorSession session, ConnectorTableHandle tableHandle) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.trino.spi.connector.ConnectorMetadata
addColumn, applyAggregation, applyJoin, applyJoin, applyLimit, applySample, applyTableScanRedirect, applyTopN, beginQuery, beginRefreshMaterializedView, beginStatisticsCollection, beginTableExecute, cleanupQuery, createRole, createView, delegateMaterializedViewRefreshToConnector, denySchemaPrivileges, denyTablePrivileges, dropColumn, dropField, dropMaterializedView, dropRole, dropView, executeTableExecute, finishMerge, finishRefreshMaterializedView, finishStatisticsCollection, finishTableExecute, getAggregationFunctionMetadata, getCommonPartitioningHandle, getFunctionDependencies, getFunctionMetadata, getFunctions, getInfo, getInsertLayout, getLayoutForTableExecute, getMaterializedView, getMaterializedViewFreshness, getMaterializedViews, getMaxWriterTasks, getMergeRowIdColumnHandle, getNewTableLayout, getRowChangeParadigm, getSchemaOwner, getSchemaOwner, getSchemaProperties, getSchemaProperties, getSchemaTableName, getStatisticsCollectionMetadataForWrite, getTableHandle, getTableHandleForExecute, getTableName, getTableProperties, getTableSchema, getTableStatistics, getUpdateLayout, getView, getViews, grantRoles, grantSchemaPrivileges, grantTablePrivileges, listApplicableRoles, listEnabledRoles, listFunctions, listMaterializedViews, listRoleGrants, listRoles, listTablePrivileges, listViews, makeCompatiblePartitioning, redirectTable, refreshMaterializedView, renameColumn, renameMaterializedView, renameSchema, renameTable, renameView, resolveIndex, revokeRoles, revokeSchemaPrivileges, revokeTablePrivileges, roleExists, setColumnType, setMaterializedViewProperties, setSchemaAuthorization, setTableAuthorization, setTableProperties, setViewAuthorization, setViewColumnComment, setViewComment, streamTableColumns, supportsReportingWrittenBytes, supportsReportingWrittenBytes, validateScan
-
Constructor Details
-
BigQueryMetadata
public BigQueryMetadata(BigQueryClientFactory bigQueryClientFactory, com.google.common.util.concurrent.ListeningExecutorService executorService)
-
-
Method Details
-
listSchemaNames
- Specified by:
listSchemaNamesin interfaceConnectorMetadata
-
schemaExists
- Specified by:
schemaExistsin interfaceConnectorMetadata
-
listTables
- Specified by:
listTablesin interfaceConnectorMetadata
-
getTableHandle
public ConnectorTableHandle getTableHandle(ConnectorSession session, SchemaTableName schemaTableName) - Specified by:
getTableHandlein interfaceConnectorMetadata
-
getTableMetadata
public ConnectorTableMetadata getTableMetadata(ConnectorSession session, ConnectorTableHandle tableHandle) - Specified by:
getTableMetadatain interfaceConnectorMetadata
-
getSystemTable
- Specified by:
getSystemTablein 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
-
processInParallel
-
createSchema
public void createSchema(ConnectorSession session, String schemaName, Map<String, Object> properties, TrinoPrincipal owner) - Specified by:
createSchemain interfaceConnectorMetadata
-
dropSchema
- Specified by:
dropSchemain interfaceConnectorMetadata
-
rollback
public void rollback() -
createTable
public void createTable(ConnectorSession session, ConnectorTableMetadata tableMetadata, boolean ignoreExisting) - Specified by:
createTablein interfaceConnectorMetadata
-
beginCreateTable
public ConnectorOutputTableHandle beginCreateTable(ConnectorSession session, ConnectorTableMetadata tableMetadata, Optional<ConnectorTableLayout> layout, RetryMode retryMode) - 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
-
dropTable
- Specified by:
dropTablein interfaceConnectorMetadata
-
truncateTable
- Specified by:
truncateTablein interfaceConnectorMetadata
-
supportsMissingColumnsOnInsert
public boolean supportsMissingColumnsOnInsert()- Specified by:
supportsMissingColumnsOnInsertin interfaceConnectorMetadata
-
beginInsert
public ConnectorInsertTableHandle beginInsert(ConnectorSession session, ConnectorTableHandle tableHandle, List<ColumnHandle> columns, RetryMode retryMode) - Specified by:
beginInsertin interfaceConnectorMetadata
-
finishInsert
public Optional<ConnectorOutputMetadata> finishInsert(ConnectorSession session, ConnectorInsertTableHandle insertHandle, Collection<io.airlift.slice.Slice> fragments, Collection<ComputedStatistics> computedStatistics) - Specified by:
finishInsertin interfaceConnectorMetadata
-
applyDelete
public Optional<ConnectorTableHandle> applyDelete(ConnectorSession session, ConnectorTableHandle handle) - Specified by:
applyDeletein interfaceConnectorMetadata
-
executeDelete
- Specified by:
executeDeletein interfaceConnectorMetadata
-
beginMerge
public ConnectorMergeTableHandle beginMerge(ConnectorSession session, ConnectorTableHandle tableHandle, RetryMode retryMode) - Specified by:
beginMergein interfaceConnectorMetadata
-
createMaterializedView
public void createMaterializedView(ConnectorSession session, SchemaTableName viewName, ConnectorMaterializedViewDefinition definition, boolean replace, boolean ignoreExisting) - Specified by:
createMaterializedViewin interfaceConnectorMetadata
-
getStatisticsCollectionMetadata
public ConnectorAnalyzeMetadata getStatisticsCollectionMetadata(ConnectorSession session, ConnectorTableHandle tableHandle, Map<String, Object> analyzeProperties) - Specified by:
getStatisticsCollectionMetadatain interfaceConnectorMetadata
-
setTableComment
public void setTableComment(ConnectorSession session, ConnectorTableHandle tableHandle, Optional<String> newComment) - Specified by:
setTableCommentin interfaceConnectorMetadata
-
setColumnComment
public void setColumnComment(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle columnHandle, Optional<String> newComment) - Specified by:
setColumnCommentin interfaceConnectorMetadata
-
applyProjection
public Optional<ProjectionApplicationResult<ConnectorTableHandle>> applyProjection(ConnectorSession session, ConnectorTableHandle handle, List<ConnectorExpression> projections, Map<String, ColumnHandle> assignments) - Specified by:
applyProjectionin interfaceConnectorMetadata
-
applyFilter
public Optional<ConstraintApplicationResult<ConnectorTableHandle>> applyFilter(ConnectorSession session, ConnectorTableHandle handle, Constraint constraint) - Specified by:
applyFilterin interfaceConnectorMetadata
-
applyTableFunction
public Optional<TableFunctionApplicationResult<ConnectorTableHandle>> applyTableFunction(ConnectorSession session, ConnectorTableFunctionHandle handle) - Specified by:
applyTableFunctionin interfaceConnectorMetadata
-