Search in sources :

Example 26 with CatalogName

use of io.prestosql.spi.connector.CatalogName in project hetu-core by openlookeng.

the class MetadataManager method dropView.

@Override
public void dropView(Session session, QualifiedObjectName viewName) {
    CatalogMetadata catalogMetadata = getCatalogMetadataForWrite(session, viewName.getCatalogName());
    CatalogName catalogName = catalogMetadata.getCatalogName();
    ConnectorMetadata metadata = catalogMetadata.getMetadata();
    metadata.dropView(session.toConnectorSession(catalogName), toSchemaTableName(viewName));
}
Also used : CatalogName(io.prestosql.spi.connector.CatalogName) ConnectorMetadata(io.prestosql.spi.connector.ConnectorMetadata)

Example 27 with CatalogName

use of io.prestosql.spi.connector.CatalogName in project hetu-core by openlookeng.

the class MetadataManager method getUpdateRowIdColumnHandle.

@Override
public ColumnHandle getUpdateRowIdColumnHandle(Session session, TableHandle tableHandle, List<ColumnHandle> updatedColumns) {
    CatalogName catalogName = tableHandle.getCatalogName();
    ConnectorMetadata metadata = getMetadata(session, catalogName);
    return metadata.getUpdateRowIdColumnHandle(session.toConnectorSession(catalogName), tableHandle.getConnectorHandle(), updatedColumns);
}
Also used : CatalogName(io.prestosql.spi.connector.CatalogName) ConnectorMetadata(io.prestosql.spi.connector.ConnectorMetadata)

Example 28 with CatalogName

use of io.prestosql.spi.connector.CatalogName in project hetu-core by openlookeng.

the class MetadataManager method listEnabledRoles.

@Override
public Set<String> listEnabledRoles(Session session, String catalog) {
    Optional<CatalogMetadata> catalogMetadata = getOptionalCatalogMetadata(session, catalog);
    if (!catalogMetadata.isPresent()) {
        return ImmutableSet.of();
    }
    CatalogName catalogName = catalogMetadata.get().getCatalogName();
    ConnectorSession connectorSession = session.toConnectorSession(catalogName);
    ConnectorMetadata metadata = catalogMetadata.get().getMetadataFor(catalogName);
    return ImmutableSet.copyOf(metadata.listEnabledRoles(connectorSession));
}
Also used : CatalogName(io.prestosql.spi.connector.CatalogName) ConnectorSession(io.prestosql.spi.connector.ConnectorSession) ConnectorMetadata(io.prestosql.spi.connector.ConnectorMetadata)

Example 29 with CatalogName

use of io.prestosql.spi.connector.CatalogName in project hetu-core by openlookeng.

the class MetadataManager method validateAndGetSortAggregationType.

@Override
public PartialAndFinalAggregationType validateAndGetSortAggregationType(Session session, TableHandle tableHandle, List<String> keyNames) {
    CatalogName catalogName = tableHandle.getCatalogName();
    ConnectorMetadata metadata = getMetadata(session, catalogName);
    return metadata.validateAndGetSortAggregationType(session.toConnectorSession(catalogName), tableHandle.getConnectorHandle(), keyNames);
}
Also used : CatalogName(io.prestosql.spi.connector.CatalogName) ConnectorMetadata(io.prestosql.spi.connector.ConnectorMetadata)

Example 30 with CatalogName

use of io.prestosql.spi.connector.CatalogName in project hetu-core by openlookeng.

the class MetadataManager method dropRole.

@Override
public void dropRole(Session session, String role, String catalog) {
    CatalogMetadata catalogMetadata = getCatalogMetadataForWrite(session, catalog);
    CatalogName catalogName = catalogMetadata.getCatalogName();
    ConnectorMetadata metadata = catalogMetadata.getMetadata();
    metadata.dropRole(session.toConnectorSession(catalogName), role);
}
Also used : CatalogName(io.prestosql.spi.connector.CatalogName) ConnectorMetadata(io.prestosql.spi.connector.ConnectorMetadata)

Aggregations

CatalogName (io.prestosql.spi.connector.CatalogName)155 ConnectorMetadata (io.prestosql.spi.connector.ConnectorMetadata)82 ConnectorSession (io.prestosql.spi.connector.ConnectorSession)32 TableHandle (io.prestosql.spi.metadata.TableHandle)30 PrestoException (io.prestosql.spi.PrestoException)22 ImmutableList (com.google.common.collect.ImmutableList)21 Optional (java.util.Optional)21 Session (io.prestosql.Session)20 QualifiedObjectName (io.prestosql.spi.connector.QualifiedObjectName)20 List (java.util.List)20 HashMap (java.util.HashMap)19 Map (java.util.Map)19 ConnectorDeleteAsInsertTableHandle (io.prestosql.spi.connector.ConnectorDeleteAsInsertTableHandle)18 ConnectorTableHandle (io.prestosql.spi.connector.ConnectorTableHandle)18 ConnectorInsertTableHandle (io.prestosql.spi.connector.ConnectorInsertTableHandle)17 ConnectorOutputTableHandle (io.prestosql.spi.connector.ConnectorOutputTableHandle)17 ConnectorUpdateTableHandle (io.prestosql.spi.connector.ConnectorUpdateTableHandle)17 ConnectorVacuumTableHandle (io.prestosql.spi.connector.ConnectorVacuumTableHandle)17 ConnectorTransactionHandle (io.prestosql.spi.connector.ConnectorTransactionHandle)16 Type (io.prestosql.spi.type.Type)16