Search in sources :

Example 1 with ConnectorIndexProvider

use of com.facebook.presto.spi.connector.ConnectorIndexProvider in project presto by prestodb.

the class IndexManager method getProvider.

private ConnectorIndexProvider getProvider(IndexHandle handle) {
    ConnectorIndexProvider result = providers.get(handle.getConnectorId());
    checkArgument(result != null, "No index provider for connector '%s'", handle.getConnectorId());
    return result;
}
Also used : ConnectorIndexProvider(com.facebook.presto.spi.connector.ConnectorIndexProvider)

Example 2 with ConnectorIndexProvider

use of com.facebook.presto.spi.connector.ConnectorIndexProvider in project presto by prestodb.

the class IndexManager method getIndex.

public ConnectorIndex getIndex(Session session, IndexHandle indexHandle, List<ColumnHandle> lookupSchema, List<ColumnHandle> outputSchema) {
    ConnectorSession connectorSession = session.toConnectorSession(indexHandle.getConnectorId());
    ConnectorIndexProvider provider = getProvider(indexHandle);
    return provider.getIndex(indexHandle.getTransactionHandle(), connectorSession, indexHandle.getConnectorHandle(), lookupSchema, outputSchema);
}
Also used : ConnectorIndexProvider(com.facebook.presto.spi.connector.ConnectorIndexProvider) ConnectorSession(com.facebook.presto.spi.ConnectorSession)

Aggregations

ConnectorIndexProvider (com.facebook.presto.spi.connector.ConnectorIndexProvider)2 ConnectorSession (com.facebook.presto.spi.ConnectorSession)1