Search in sources :

Example 1 with ConnectorIndexProvider

use of io.trino.spi.connector.ConnectorIndexProvider in project trino by trinodb.

the class IndexManager method getProvider.

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

Example 2 with ConnectorIndexProvider

use of io.trino.spi.connector.ConnectorIndexProvider in project trino by trinodb.

the class IndexManager method getIndex.

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

Aggregations

ConnectorIndexProvider (io.trino.spi.connector.ConnectorIndexProvider)2 ConnectorSession (io.trino.spi.connector.ConnectorSession)1