Search in sources :

Example 1 with ConnectorDeleteAsInsertTableHandle

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

the class MetadataManager method beginDeletAsInsert.

@Override
public DeletesAsInsertTableHandle beginDeletAsInsert(Session session, TableHandle tableHandle) {
    CatalogName catalogName = tableHandle.getCatalogName();
    CatalogMetadata catalogMetadata = getCatalogMetadataForWrite(session, catalogName);
    ConnectorMetadata metadata = catalogMetadata.getMetadata();
    ConnectorTransactionHandle transactionHandle = catalogMetadata.getTransactionHandleFor(catalogName);
    ConnectorDeleteAsInsertTableHandle handle = metadata.beginDeletesAsInsert(session.toConnectorSession(catalogName), tableHandle.getConnectorHandle());
    return new DeletesAsInsertTableHandle(tableHandle.getCatalogName(), transactionHandle, handle);
}
Also used : ConnectorTransactionHandle(io.prestosql.spi.connector.ConnectorTransactionHandle) CatalogName(io.prestosql.spi.connector.CatalogName) ConnectorMetadata(io.prestosql.spi.connector.ConnectorMetadata) ConnectorDeleteAsInsertTableHandle(io.prestosql.spi.connector.ConnectorDeleteAsInsertTableHandle)

Aggregations

CatalogName (io.prestosql.spi.connector.CatalogName)1 ConnectorDeleteAsInsertTableHandle (io.prestosql.spi.connector.ConnectorDeleteAsInsertTableHandle)1 ConnectorMetadata (io.prestosql.spi.connector.ConnectorMetadata)1 ConnectorTransactionHandle (io.prestosql.spi.connector.ConnectorTransactionHandle)1