Search in sources :

Example 86 with QueryComponent

use of com.apple.foundationdb.record.query.expressions.QueryComponent in project fdb-record-layer by FoundationDB.

the class RecordQueryPlanner method plan.

/**
 * Create a plan to get the results of the provided query.
 *
 * @param query a query for records on this planner's metadata
 * @param parameterRelationshipGraph a set of bindings and their relationships that provide additional information
 *        to the planner that may improve plan quality but may also tighten requirements imposed on the parameter
 *        bindings that are used to execute the query
 * @return a plan that will return the results of the provided query when executed
 * @throws com.apple.foundationdb.record.RecordCoreException if there is no index that matches the sort in the provided query
 */
@Nonnull
@Override
public RecordQueryPlan plan(@Nonnull RecordQuery query, @Nonnull ParameterRelationshipGraph parameterRelationshipGraph) {
    query.validate(metaData);
    final PlanContext planContext = getPlanContext(query);
    final BooleanNormalizer normalizer = BooleanNormalizer.forConfiguration(configuration);
    final QueryComponent queryFilter = query.getFilter();
    final QueryComponent filter = normalizer.normalizeIfPossible(queryFilter == null ? null : queryFilter.withParameterRelationshipMap(parameterRelationshipGraph));
    final KeyExpression sort = query.getSort();
    final boolean sortReverse = query.isSortReverse();
    RecordQueryPlan plan = plan(planContext, filter, sort, sortReverse);
    if (plan == null) {
        if (sort == null) {
            throw new RecordCoreException("Unexpected failure to plan without sort");
        }
        final RecordQueryPlannerSortConfiguration sortConfiguration = configuration.getSortConfiguration();
        if (sortConfiguration != null && sortConfiguration.shouldAllowNonIndexSort(query)) {
            final PlanContext withoutSort = new PlanContext(query.toBuilder().setSort(null).build(), planContext.indexes, planContext.commonPrimaryKey);
            plan = plan(withoutSort, filter, null, false);
            if (plan == null) {
                throw new RecordCoreException("Unexpected failure to plan without sort");
            }
            plan = new RecordQuerySortPlan(plan, sortConfiguration.getSortKey(sort, sortReverse));
        } else {
            throw new RecordCoreException("Cannot sort without appropriate index: " + sort);
        }
    }
    if (query.getRequiredResults() != null) {
        plan = tryToConvertToCoveringPlan(planContext, plan);
    }
    if (timer != null) {
        plan.logPlanStructure(timer);
    }
    if (plan.getComplexity() > configuration.getComplexityThreshold()) {
        throw new RecordQueryPlanComplexityException(plan);
    }
    if (logger.isTraceEnabled()) {
        logger.trace(KeyValueLogMessage.of("explain of plan", "explain", PlannerGraphProperty.explain(plan)));
    }
    return plan;
}
Also used : RecordQueryPlan(com.apple.foundationdb.record.query.plan.plans.RecordQueryPlan) QueryComponent(com.apple.foundationdb.record.query.expressions.QueryComponent) RecordCoreException(com.apple.foundationdb.record.RecordCoreException) RecordQuerySortPlan(com.apple.foundationdb.record.query.plan.sorting.RecordQuerySortPlan) RecordTypeKeyExpression(com.apple.foundationdb.record.metadata.expressions.RecordTypeKeyExpression) VersionKeyExpression(com.apple.foundationdb.record.metadata.expressions.VersionKeyExpression) GroupingKeyExpression(com.apple.foundationdb.record.metadata.expressions.GroupingKeyExpression) KeyExpression(com.apple.foundationdb.record.metadata.expressions.KeyExpression) FieldKeyExpression(com.apple.foundationdb.record.metadata.expressions.FieldKeyExpression) NestingKeyExpression(com.apple.foundationdb.record.metadata.expressions.NestingKeyExpression) EmptyKeyExpression(com.apple.foundationdb.record.metadata.expressions.EmptyKeyExpression) ThenKeyExpression(com.apple.foundationdb.record.metadata.expressions.ThenKeyExpression) BooleanNormalizer(com.apple.foundationdb.record.query.plan.planning.BooleanNormalizer) RecordQueryPlannerSortConfiguration(com.apple.foundationdb.record.query.plan.sorting.RecordQueryPlannerSortConfiguration) Nonnull(javax.annotation.Nonnull)

Example 87 with QueryComponent

use of com.apple.foundationdb.record.query.expressions.QueryComponent in project fdb-record-layer by FoundationDB.

the class RecordQueryPlanner method normalizeAndOr.

@Nonnull
private // Distribute it across a disjunction so that we can union complex index lookups.
QueryComponent normalizeAndOr(AndComponent and) {
    if (and.getChildren().size() == 2) {
        QueryComponent child1 = and.getChildren().get(0);
        QueryComponent child2 = and.getChildren().get(1);
        if (child1 instanceof OrComponent && Query.isSingleFieldComparison(child2)) {
            return OrComponent.from(distributeAnd(Collections.singletonList(child2), ((OrComponent) child1).getChildren()));
        }
        if (child2 instanceof OrComponent && Query.isSingleFieldComparison(child1)) {
            return OrComponent.from(distributeAnd(Collections.singletonList(child1), ((OrComponent) child2).getChildren()));
        }
    }
    return and;
}
Also used : QueryComponent(com.apple.foundationdb.record.query.expressions.QueryComponent) OrComponent(com.apple.foundationdb.record.query.expressions.OrComponent) Nonnull(javax.annotation.Nonnull)

Example 88 with QueryComponent

use of com.apple.foundationdb.record.query.expressions.QueryComponent in project fdb-record-layer by FoundationDB.

the class RecordQueryPlanner method distributeAnd.

private List<QueryComponent> distributeAnd(List<QueryComponent> predicatesToDistribute, List<QueryComponent> children) {
    List<QueryComponent> distributed = new ArrayList<>();
    for (QueryComponent child : children) {
        List<QueryComponent> conjuncts = new ArrayList<>(2);
        conjuncts.addAll(predicatesToDistribute);
        if (child instanceof AndComponent) {
            conjuncts.addAll(((AndComponent) child).getChildren());
        } else {
            conjuncts.add(child);
        }
        child = AndComponent.from(conjuncts);
        distributed.add(child);
    }
    return distributed;
}
Also used : QueryComponent(com.apple.foundationdb.record.query.expressions.QueryComponent) AndComponent(com.apple.foundationdb.record.query.expressions.AndComponent) ArrayList(java.util.ArrayList)

Example 89 with QueryComponent

use of com.apple.foundationdb.record.query.expressions.QueryComponent in project fdb-record-layer by FoundationDB.

the class RecordQueryPlanner method planOr.

@Nullable
private ScoredPlan planOr(@Nonnull PlanContext planContext, @Nonnull OrComponent filter) {
    if (filter.getChildren().isEmpty()) {
        return null;
    }
    List<ScoredPlan> subplans = new ArrayList<>(filter.getChildren().size());
    boolean allHaveOrderingKey = true;
    RecordQueryPlan commonFilteredBasePlan = null;
    boolean allHaveSameBasePlan = true;
    for (QueryComponent subfilter : filter.getChildren()) {
        ScoredPlan subplan = planFilter(planContext, subfilter, true);
        if (subplan == null) {
            return null;
        }
        if (subplan.planOrderingKey == null) {
            allHaveOrderingKey = false;
        }
        RecordQueryPlan filteredBasePlan;
        if (subplan.plan instanceof RecordQueryFilterPlan) {
            filteredBasePlan = ((RecordQueryFilterPlan) subplan.plan).getInnerPlan();
        } else {
            filteredBasePlan = null;
        }
        if (subplans.isEmpty()) {
            commonFilteredBasePlan = filteredBasePlan;
            allHaveSameBasePlan = filteredBasePlan != null;
        } else if (allHaveSameBasePlan && !Objects.equals(filteredBasePlan, commonFilteredBasePlan)) {
            allHaveSameBasePlan = false;
        }
        subplans.add(subplan);
    }
    // out there over the equivalent OR(EQUALS) filters.
    if (allHaveSameBasePlan) {
        final RecordQueryPlan combinedOrFilter = new RecordQueryFilterPlan(commonFilteredBasePlan, new OrComponent(subplans.stream().map(subplan -> ((RecordQueryFilterPlan) subplan.plan).getConjunctedFilter()).collect(Collectors.toList())));
        ScoredPlan firstSubPlan = subplans.get(0);
        return new ScoredPlan(combinedOrFilter, Collections.emptyList(), Collections.emptyList(), firstSubPlan.score, firstSubPlan.createsDuplicates, firstSubPlan.includedRankComparisons);
    }
    // neither removes duplicates nor requires the children be in order.
    if (allHaveOrderingKey) {
        final ScoredPlan orderedUnionPlan = planOrderedUnion(planContext, subplans);
        if (orderedUnionPlan != null) {
            return orderedUnionPlan;
        }
    }
    final ScoredPlan unorderedUnionPlan = planUnorderedUnion(planContext, subplans);
    if (unorderedUnionPlan != null) {
        return planRemoveDuplicates(planContext, unorderedUnionPlan);
    }
    return null;
}
Also used : RecordQueryPlan(com.apple.foundationdb.record.query.plan.plans.RecordQueryPlan) RecordQueryFilterPlan(com.apple.foundationdb.record.query.plan.plans.RecordQueryFilterPlan) RecordQueryIntersectionPlan(com.apple.foundationdb.record.query.plan.plans.RecordQueryIntersectionPlan) StoreTimer(com.apple.foundationdb.record.provider.common.StoreTimer) RecordTypeKeyExpression(com.apple.foundationdb.record.metadata.expressions.RecordTypeKeyExpression) LoggerFactory(org.slf4j.LoggerFactory) IndexScanType(com.apple.foundationdb.record.IndexScanType) KeyValueLogMessage(com.apple.foundationdb.record.logging.KeyValueLogMessage) QueryRecordFunctionWithComparison(com.apple.foundationdb.record.query.expressions.QueryRecordFunctionWithComparison) RecordCoreException(com.apple.foundationdb.record.RecordCoreException) VersionKeyExpression(com.apple.foundationdb.record.metadata.expressions.VersionKeyExpression) RecordQueryScanPlan(com.apple.foundationdb.record.query.plan.plans.RecordQueryScanPlan) GroupingKeyExpression(com.apple.foundationdb.record.metadata.expressions.GroupingKeyExpression) FieldWithComparisonCountProperty(com.apple.foundationdb.record.query.plan.temp.properties.FieldWithComparisonCountProperty) RecordQueryUnionPlan(com.apple.foundationdb.record.query.plan.plans.RecordQueryUnionPlan) RecordQueryUnorderedUnionPlan(com.apple.foundationdb.record.query.plan.plans.RecordQueryUnorderedUnionPlan) Query(com.apple.foundationdb.record.query.expressions.Query) KeyExpression(com.apple.foundationdb.record.metadata.expressions.KeyExpression) TimeWindowScanComparisons(com.apple.foundationdb.record.provider.foundationdb.leaderboard.TimeWindowScanComparisons) Collection(java.util.Collection) PlannerGraphProperty(com.apple.foundationdb.record.query.plan.temp.explain.PlannerGraphProperty) Set(java.util.Set) FanType(com.apple.foundationdb.record.metadata.expressions.KeyExpression.FanType) AndComponent(com.apple.foundationdb.record.query.expressions.AndComponent) TextScanPlanner(com.apple.foundationdb.record.query.plan.planning.TextScanPlanner) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) RecordQueryCoveringIndexPlan(com.apple.foundationdb.record.query.plan.plans.RecordQueryCoveringIndexPlan) List(java.util.List) OneOfThemWithComponent(com.apple.foundationdb.record.query.expressions.OneOfThemWithComponent) RecordQueryInUnionPlan(com.apple.foundationdb.record.query.plan.plans.RecordQueryInUnionPlan) RecordQueryUnorderedPrimaryKeyDistinctPlan(com.apple.foundationdb.record.query.plan.plans.RecordQueryUnorderedPrimaryKeyDistinctPlan) RecordStoreState(com.apple.foundationdb.record.RecordStoreState) RecordTypeKeyComparison(com.apple.foundationdb.record.query.expressions.RecordTypeKeyComparison) API(com.apple.foundationdb.annotation.API) RecordQueryTypeFilterPlan(com.apple.foundationdb.record.query.plan.plans.RecordQueryTypeFilterPlan) FunctionNames(com.apple.foundationdb.record.FunctionNames) RecordMetaData(com.apple.foundationdb.record.RecordMetaData) RecordQueryPlannerSubstitutionVisitor(com.apple.foundationdb.record.query.plan.visitor.RecordQueryPlannerSubstitutionVisitor) Iterables(com.google.common.collect.Iterables) SpotBugsSuppressWarnings(com.apple.foundationdb.annotation.SpotBugsSuppressWarnings) IndexScanParameters(com.apple.foundationdb.record.provider.foundationdb.IndexScanParameters) RecordQueryPlannerSortConfiguration(com.apple.foundationdb.record.query.plan.sorting.RecordQueryPlannerSortConfiguration) InExtractor(com.apple.foundationdb.record.query.plan.planning.InExtractor) KeyWithValueExpression(com.apple.foundationdb.record.metadata.expressions.KeyWithValueExpression) RecordQuery(com.apple.foundationdb.record.query.RecordQuery) RecordQueryPlan(com.apple.foundationdb.record.query.plan.plans.RecordQueryPlan) BooleanNormalizer(com.apple.foundationdb.record.query.plan.planning.BooleanNormalizer) ArrayList(java.util.ArrayList) Key(com.apple.foundationdb.record.metadata.Key) FieldKeyExpression(com.apple.foundationdb.record.metadata.expressions.FieldKeyExpression) HashSet(java.util.HashSet) UnorderedPrimaryKeyDistinctVisitor(com.apple.foundationdb.record.query.plan.visitor.UnorderedPrimaryKeyDistinctVisitor) FilterVisitor(com.apple.foundationdb.record.query.plan.visitor.FilterVisitor) Lists(com.google.common.collect.Lists) ImmutableList(com.google.common.collect.ImmutableList) NestingKeyExpression(com.apple.foundationdb.record.metadata.expressions.NestingKeyExpression) ParameterRelationshipGraph(com.apple.foundationdb.record.query.ParameterRelationshipGraph) IndexScanComparisons(com.apple.foundationdb.record.provider.foundationdb.IndexScanComparisons) TimeWindowRecordFunction(com.apple.foundationdb.record.provider.foundationdb.leaderboard.TimeWindowRecordFunction) InSource(com.apple.foundationdb.record.query.plan.plans.InSource) Nonnull(javax.annotation.Nonnull) EmptyKeyExpression(com.apple.foundationdb.record.metadata.expressions.EmptyKeyExpression) Nullable(javax.annotation.Nullable) QueryKeyExpressionWithComparison(com.apple.foundationdb.record.query.expressions.QueryKeyExpressionWithComparison) FieldWithComparison(com.apple.foundationdb.record.query.expressions.FieldWithComparison) RecordQueryIndexPlan(com.apple.foundationdb.record.query.plan.plans.RecordQueryIndexPlan) RecordQueryPlanWithIndex(com.apple.foundationdb.record.query.plan.plans.RecordQueryPlanWithIndex) Logger(org.slf4j.Logger) FilterSatisfiedMask(com.apple.foundationdb.record.query.plan.planning.FilterSatisfiedMask) Iterator(java.util.Iterator) RecordQueryTextIndexPlan(com.apple.foundationdb.record.query.plan.plans.RecordQueryTextIndexPlan) RankComparisons(com.apple.foundationdb.record.query.plan.planning.RankComparisons) OrComponent(com.apple.foundationdb.record.query.expressions.OrComponent) Comparisons(com.apple.foundationdb.record.query.expressions.Comparisons) RecordType(com.apple.foundationdb.record.metadata.RecordType) NestedField(com.apple.foundationdb.record.query.expressions.NestedField) Index(com.apple.foundationdb.record.metadata.Index) RecordQuerySortPlan(com.apple.foundationdb.record.query.plan.sorting.RecordQuerySortPlan) QueryKeyExpressionWithOneOfComparison(com.apple.foundationdb.record.query.expressions.QueryKeyExpressionWithOneOfComparison) OneOfThemWithComparison(com.apple.foundationdb.record.query.expressions.OneOfThemWithComparison) QueryComponent(com.apple.foundationdb.record.query.expressions.QueryComponent) VisibleForTesting(com.google.common.annotations.VisibleForTesting) Comparator(java.util.Comparator) ThenKeyExpression(com.apple.foundationdb.record.metadata.expressions.ThenKeyExpression) Collections(java.util.Collections) QueryComponent(com.apple.foundationdb.record.query.expressions.QueryComponent) RecordQueryFilterPlan(com.apple.foundationdb.record.query.plan.plans.RecordQueryFilterPlan) OrComponent(com.apple.foundationdb.record.query.expressions.OrComponent) ArrayList(java.util.ArrayList) Nullable(javax.annotation.Nullable)

Example 90 with QueryComponent

use of com.apple.foundationdb.record.query.expressions.QueryComponent in project fdb-record-layer by FoundationDB.

the class RankComparisons method findComparison.

private void findComparison(@Nonnull QueryRecordFunctionWithComparison comparison, @Nonnull List<Index> indexes, @Nonnull List<QueryComponent> potentialGroupFilters, @Nonnull AtomicInteger counter) {
    RecordFunction<?> recordFunction = comparison.getFunction();
    // TODO: Should share with indexMaintainerForAggregateFunction
    // TODO: Move index-specific query planning behavior outside of planner (https://github.com/FoundationDB/fdb-record-layer/issues/17)
    List<String> requiredIndexTypes;
    if (recordFunction.getName().equals(FunctionNames.RANK)) {
        requiredIndexTypes = Arrays.asList(IndexTypes.RANK, IndexTypes.TIME_WINDOW_LEADERBOARD);
    } else if (recordFunction.getName().equals(FunctionNames.TIME_WINDOW_RANK)) {
        requiredIndexTypes = Collections.singletonList(IndexTypes.TIME_WINDOW_LEADERBOARD);
    } else {
        requiredIndexTypes = null;
    }
    if (requiredIndexTypes != null) {
        final GroupingKeyExpression operand = ((IndexRecordFunction) recordFunction).getOperand();
        Optional<Index> matchingIndex = indexes.stream().filter(index -> requiredIndexTypes.contains(index.getType()) && index.getRootExpression().equals(operand)).min(Comparator.comparing(Index::getColumnSize));
        if (matchingIndex.isPresent()) {
            final KeyExpression groupBy = operand.getGroupingSubKey();
            final List<QueryComponent> groupFilters = new ArrayList<>();
            final List<Comparisons.Comparison> groupComparisons = new ArrayList<>();
            if (!GroupingValidator.findGroupKeyFilters(potentialGroupFilters, groupBy, groupFilters, groupComparisons)) {
                return;
            }
            QueryComponent substitute = null;
            String bindingName = null;
            final Comparisons.Type comparisonType = comparison.getComparison().getType();
            if (!operand.createsDuplicates() && !comparisonType.isUnary()) {
                bindingName = Bindings.Internal.RANK.bindingName(Integer.toString(counter.getAndIncrement()));
                Comparisons.Comparison substituteComparison = new Comparisons.ParameterComparison(comparisonType, bindingName, Bindings.Internal.RANK);
                final KeyExpression grouped = operand.getGroupedSubKey();
                if (grouped instanceof FieldKeyExpression) {
                    substitute = new FieldWithComparison(((FieldKeyExpression) grouped).getFieldName(), substituteComparison);
                } else if (grouped instanceof NestingKeyExpression) {
                    NestingKeyExpression nesting = (NestingKeyExpression) grouped;
                    if (nesting.getChild() instanceof FieldKeyExpression) {
                        substitute = new NestedField(nesting.getParent().getFieldName(), new FieldWithComparison(((FieldKeyExpression) nesting.getChild()).getFieldName(), substituteComparison));
                    }
                }
                if (substitute == null) {
                    bindingName = null;
                }
            }
            comparisons.put(comparison, new RankComparison(comparison, matchingIndex.get(), groupFilters, groupComparisons, substitute, bindingName));
        }
    }
}
Also used : FunctionNames(com.apple.foundationdb.record.FunctionNames) RecordMetaData(com.apple.foundationdb.record.RecordMetaData) Arrays(java.util.Arrays) IndexAggregateFunction(com.apple.foundationdb.record.metadata.IndexAggregateFunction) Bindings(com.apple.foundationdb.record.Bindings) HashMap(java.util.HashMap) RecordQueryPlan(com.apple.foundationdb.record.query.plan.plans.RecordQueryPlan) Function(java.util.function.Function) ArrayList(java.util.ArrayList) FieldKeyExpression(com.apple.foundationdb.record.metadata.expressions.FieldKeyExpression) Tuple(com.apple.foundationdb.tuple.Tuple) QueryRecordFunctionWithComparison(com.apple.foundationdb.record.query.expressions.QueryRecordFunctionWithComparison) RecordCoreException(com.apple.foundationdb.record.RecordCoreException) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) NestingKeyExpression(com.apple.foundationdb.record.metadata.expressions.NestingKeyExpression) Map(java.util.Map) GroupingKeyExpression(com.apple.foundationdb.record.metadata.expressions.GroupingKeyExpression) IndexRecordFunction(com.apple.foundationdb.record.metadata.IndexRecordFunction) Nonnull(javax.annotation.Nonnull) Nullable(javax.annotation.Nullable) FieldWithComparison(com.apple.foundationdb.record.query.expressions.FieldWithComparison) KeyExpression(com.apple.foundationdb.record.metadata.expressions.KeyExpression) Set(java.util.Set) ScanComparisons(com.apple.foundationdb.record.query.plan.ScanComparisons) RecordQueryScoreForRankPlan(com.apple.foundationdb.record.query.plan.plans.RecordQueryScoreForRankPlan) AndComponent(com.apple.foundationdb.record.query.expressions.AndComponent) Collectors(java.util.stream.Collectors) AndOrComponent(com.apple.foundationdb.record.query.expressions.AndOrComponent) Comparisons(com.apple.foundationdb.record.query.expressions.Comparisons) List(java.util.List) NestedField(com.apple.foundationdb.record.query.expressions.NestedField) Index(com.apple.foundationdb.record.metadata.Index) IndexTypes(com.apple.foundationdb.record.metadata.IndexTypes) QueryComponent(com.apple.foundationdb.record.query.expressions.QueryComponent) Optional(java.util.Optional) API(com.apple.foundationdb.annotation.API) RecordFunction(com.apple.foundationdb.record.RecordFunction) Comparator(java.util.Comparator) ComponentWithChildren(com.apple.foundationdb.record.query.expressions.ComponentWithChildren) Collections(java.util.Collections) QueryComponent(com.apple.foundationdb.record.query.expressions.QueryComponent) IndexRecordFunction(com.apple.foundationdb.record.metadata.IndexRecordFunction) GroupingKeyExpression(com.apple.foundationdb.record.metadata.expressions.GroupingKeyExpression) FieldKeyExpression(com.apple.foundationdb.record.metadata.expressions.FieldKeyExpression) NestingKeyExpression(com.apple.foundationdb.record.metadata.expressions.NestingKeyExpression) GroupingKeyExpression(com.apple.foundationdb.record.metadata.expressions.GroupingKeyExpression) KeyExpression(com.apple.foundationdb.record.metadata.expressions.KeyExpression) ArrayList(java.util.ArrayList) Index(com.apple.foundationdb.record.metadata.Index) NestedField(com.apple.foundationdb.record.query.expressions.NestedField) FieldKeyExpression(com.apple.foundationdb.record.metadata.expressions.FieldKeyExpression) NestingKeyExpression(com.apple.foundationdb.record.metadata.expressions.NestingKeyExpression) QueryRecordFunctionWithComparison(com.apple.foundationdb.record.query.expressions.QueryRecordFunctionWithComparison) FieldWithComparison(com.apple.foundationdb.record.query.expressions.FieldWithComparison) ScanComparisons(com.apple.foundationdb.record.query.plan.ScanComparisons) Comparisons(com.apple.foundationdb.record.query.expressions.Comparisons) FieldWithComparison(com.apple.foundationdb.record.query.expressions.FieldWithComparison)

Aggregations

QueryComponent (com.apple.foundationdb.record.query.expressions.QueryComponent)96 RecordQueryPlan (com.apple.foundationdb.record.query.plan.plans.RecordQueryPlan)58 RecordQuery (com.apple.foundationdb.record.query.RecordQuery)44 Test (org.junit.jupiter.api.Test)41 FDBRecordContext (com.apple.foundationdb.record.provider.foundationdb.FDBRecordContext)37 ArrayList (java.util.ArrayList)30 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)29 FDBQueriedRecord (com.apple.foundationdb.record.provider.foundationdb.FDBQueriedRecord)25 Index (com.apple.foundationdb.record.metadata.Index)24 Nonnull (javax.annotation.Nonnull)23 Comparisons (com.apple.foundationdb.record.query.expressions.Comparisons)22 Message (com.google.protobuf.Message)22 Query (com.apple.foundationdb.record.query.expressions.Query)20 RecordQueryPlanner (com.apple.foundationdb.record.query.plan.RecordQueryPlanner)20 List (java.util.List)20 Collections (java.util.Collections)19 Nullable (javax.annotation.Nullable)18 Assertions.assertEquals (org.junit.jupiter.api.Assertions.assertEquals)18 PlanHashable (com.apple.foundationdb.record.PlanHashable)17 Expressions.field (com.apple.foundationdb.record.metadata.Key.Expressions.field)17