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);
}
Aggregations