use of com.facebook.presto.spi.connector.ConnectorMetadata in project presto by prestodb.
the class MetadataManager method getColumnMetadata.
@Override
public ColumnMetadata getColumnMetadata(Session session, TableHandle tableHandle, ColumnHandle columnHandle) {
requireNonNull(tableHandle, "tableHandle is null");
requireNonNull(columnHandle, "columnHandle is null");
ConnectorId connectorId = tableHandle.getConnectorId();
ConnectorMetadata metadata = getMetadata(session, connectorId);
return metadata.getColumnMetadata(session.toConnectorSession(connectorId), tableHandle.getConnectorHandle(), columnHandle);
}
use of com.facebook.presto.spi.connector.ConnectorMetadata in project presto by prestodb.
the class MetadataManager method renameSchema.
@Override
public void renameSchema(Session session, CatalogSchemaName source, String target) {
CatalogMetadata catalogMetadata = getCatalogMetadataForWrite(session, source.getCatalogName());
ConnectorId connectorId = catalogMetadata.getConnectorId();
ConnectorMetadata metadata = catalogMetadata.getMetadata();
metadata.renameSchema(session.toConnectorSession(connectorId), source.getSchemaName(), target);
}
use of com.facebook.presto.spi.connector.ConnectorMetadata in project presto by prestodb.
the class MetadataManager method revokeTablePrivileges.
@Override
public void revokeTablePrivileges(Session session, QualifiedObjectName tableName, Set<Privilege> privileges, String grantee, boolean grantOption) {
CatalogMetadata catalogMetadata = getCatalogMetadataForWrite(session, tableName.getCatalogName());
ConnectorId connectorId = catalogMetadata.getConnectorId();
ConnectorMetadata metadata = catalogMetadata.getMetadata();
metadata.revokeTablePrivileges(session.toConnectorSession(connectorId), tableName.asSchemaTableName(), privileges, grantee, grantOption);
}
use of com.facebook.presto.spi.connector.ConnectorMetadata in project presto by prestodb.
the class MetadataManager method createSchema.
@Override
public void createSchema(Session session, CatalogSchemaName schema, Map<String, Object> properties) {
CatalogMetadata catalogMetadata = getCatalogMetadataForWrite(session, schema.getCatalogName());
ConnectorId connectorId = catalogMetadata.getConnectorId();
ConnectorMetadata metadata = catalogMetadata.getMetadata();
metadata.createSchema(session.toConnectorSession(connectorId), schema.getSchemaName(), properties);
}
use of com.facebook.presto.spi.connector.ConnectorMetadata in project presto by prestodb.
the class MetadataManager method beginQuery.
@Override
public void beginQuery(Session session, Set<ConnectorId> connectors) {
for (ConnectorId connectorId : connectors) {
ConnectorMetadata metadata = getMetadata(session, connectorId);
ConnectorSession connectorSession = session.toConnectorSession(connectorId);
metadata.beginQuery(connectorSession);
registerCatalogForQueryId(session.getQueryId(), metadata);
}
}
Aggregations