presto-main/src/main/java/io/prestosql/metadata/MetadataManager.java/MetadataManager/beginInsert
class MetadataManager:    @Override
    public InsertTableHandle beginInsert(Session session, TableHandle tableHandle)
    {
        CatalogName catalogName = tableHandle.getCatalogName();
        CatalogMetadata catalogMetadata = getCatalogMetadataForWrite(session, catalogName);
        ConnectorMetadata metadata = catalogMetadata.getMetadata();
        ConnectorTransactionHandle transactionHandle = catalogMetadata.getTransactionHandleFor(catalogName);
        ConnectorInsertTableHandle handle = metadata.beginInsert(session.toConnectorSession(catalogName), tableHandle.getConnectorHandle());
        return new InsertTableHandle(tableHandle.getCatalogName(), transactionHandle, handle);
    }