Package io.trino.plugin.kafka
Class KafkaMetadata
- java.lang.Object
-
- io.trino.plugin.kafka.KafkaMetadata
-
- All Implemented Interfaces:
ConnectorMetadata
public class KafkaMetadata extends Object implements ConnectorMetadata
Manages the Kafka connector specific metadata information. The Connector provides an additional set of columns for each table that are created as hidden columns. SeeKafkaInternalFieldManagerfor a list of per-topic additional columns.
-
-
Constructor Summary
Constructors Constructor Description KafkaMetadata(KafkaConfig kafkaConfig, TableDescriptionSupplier tableDescriptionSupplier, KafkaInternalFieldManager kafkaInternalFieldManager)
-
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.trino.spi.connector.ConnectorMetadata
addColumn, applyAggregation, applyDelete, applyJoin, applyLimit, applyProjection, applySample, applyTableFunction, applyTableScanRedirect, applyTopN, beginCreateTable, beginDelete, beginQuery, beginRefreshMaterializedView, beginStatisticsCollection, beginTableExecute, beginUpdate, cleanupQuery, createMaterializedView, createRole, createSchema, createTable, createView, delegateMaterializedViewRefreshToConnector, denySchemaPrivileges, denyTablePrivileges, dropColumn, dropMaterializedView, dropRole, dropSchema, dropTable, dropView, executeDelete, executeTableExecute, finishCreateTable, finishDelete, finishRefreshMaterializedView, finishStatisticsCollection, finishTableExecute, finishUpdate, getCommonPartitioningHandle, getDeleteRowIdColumnHandle, getInfo, getInsertLayout, getLayoutForTableExecute, getMaterializedView, getMaterializedViewFreshness, getMaterializedViews, getNewTableLayout, getSchemaOwner, getSchemaProperties, getSchemaTableName, getStatisticsCollectionMetadata, getStatisticsCollectionMetadata, getStatisticsCollectionMetadataForWrite, getSystemTable, getTableHandle, getTableHandleForExecute, getTableHandleForStatisticsCollection, getTableSchema, getTableStatistics, getUpdateRowIdColumnHandle, getView, getViews, grantRoles, grantSchemaPrivileges, grantTablePrivileges, listAllRoleGrants, listApplicableRoles, listEnabledRoles, listMaterializedViews, listRoleGrants, listRoles, listTablePrivileges, listViews, makeCompatiblePartitioning, redirectTable, refreshMaterializedView, renameColumn, renameMaterializedView, renameSchema, renameTable, renameView, resolveIndex, revokeRoles, revokeSchemaPrivileges, revokeTablePrivileges, roleExists, schemaExists, setColumnComment, setMaterializedViewProperties, setSchemaAuthorization, setTableAuthorization, setTableComment, setTableProperties, setViewAuthorization, setViewComment, streamTableColumns, supportsMissingColumnsOnInsert, supportsReportingWrittenBytes, supportsReportingWrittenBytes, truncateTable, validateScan
-
-
-
-
Constructor Detail
-
KafkaMetadata
@Inject public KafkaMetadata(KafkaConfig kafkaConfig, TableDescriptionSupplier tableDescriptionSupplier, KafkaInternalFieldManager kafkaInternalFieldManager)
-
-
Method Detail
-
listSchemaNames
public List<String> listSchemaNames(ConnectorSession session)
- Specified by:
listSchemaNamesin interfaceConnectorMetadata
-
getTableHandle
public KafkaTableHandle getTableHandle(ConnectorSession session, SchemaTableName schemaTableName)
- Specified by:
getTableHandlein interfaceConnectorMetadata
-
getTableMetadata
public ConnectorTableMetadata getTableMetadata(ConnectorSession session, ConnectorTableHandle tableHandle)
- Specified by:
getTableMetadatain 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
-
listTableColumns
public Map<SchemaTableName,List<ColumnMetadata>> listTableColumns(ConnectorSession session, SchemaTablePrefix prefix)
- Specified by:
listTableColumnsin interfaceConnectorMetadata
-
getColumnMetadata
public ColumnMetadata getColumnMetadata(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle columnHandle)
- Specified by:
getColumnMetadatain 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
-
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
-
-