Search in sources :

Example 6 with RankedSet

use of com.apple.foundationdb.async.RankedSet in project fdb-record-layer by FoundationDB.

the class RankIndexMaintainer method evaluateEqualRange.

private CompletableFuture<Tuple> evaluateEqualRange(@Nonnull TupleRange range, @Nonnull EvaluateEqualRange function) {
    Subspace rankSubspace = getSecondarySubspace();
    Tuple values = range.getLow();
    final int groupingCount = getGroupingCount();
    if (groupingCount > 0) {
        rankSubspace = rankSubspace.subspace(TupleHelpers.subTuple(values, 0, groupingCount));
        values = TupleHelpers.subTuple(values, groupingCount, values.size());
    }
    final RankedSet rankedSet = new RankedSetIndexHelper.InstrumentedRankedSet(state, rankSubspace, config);
    return function.apply(rankedSet, values);
}
Also used : Subspace(com.apple.foundationdb.subspace.Subspace) RankedSet(com.apple.foundationdb.async.RankedSet) Tuple(com.apple.foundationdb.tuple.Tuple)

Aggregations

RankedSet (com.apple.foundationdb.async.RankedSet)6 Tuple (com.apple.foundationdb.tuple.Tuple)5 Subspace (com.apple.foundationdb.subspace.Subspace)4 EndpointType (com.apple.foundationdb.record.EndpointType)2 TupleRange (com.apple.foundationdb.record.TupleRange)2 Nonnull (javax.annotation.Nonnull)2 MutationType (com.apple.foundationdb.MutationType)1 Transaction (com.apple.foundationdb.Transaction)1 API (com.apple.foundationdb.annotation.API)1 SpotBugsSuppressWarnings (com.apple.foundationdb.annotation.SpotBugsSuppressWarnings)1 AsyncUtil (com.apple.foundationdb.async.AsyncUtil)1 MoreAsyncUtil (com.apple.foundationdb.async.MoreAsyncUtil)1 EvaluationContext (com.apple.foundationdb.record.EvaluationContext)1 FunctionNames (com.apple.foundationdb.record.FunctionNames)1 IndexEntry (com.apple.foundationdb.record.IndexEntry)1 IndexScanType (com.apple.foundationdb.record.IndexScanType)1 IsolationLevel (com.apple.foundationdb.record.IsolationLevel)1 RecordCoreException (com.apple.foundationdb.record.RecordCoreException)1 RecordCoreStorageException (com.apple.foundationdb.record.RecordCoreStorageException)1 RecordCursor (com.apple.foundationdb.record.RecordCursor)1