Search in sources :

Example 31 with RecordType

use of com.apple.foundationdb.record.metadata.RecordType in project fdb-record-layer by FoundationDB.

the class RecordQueryPlanner method planCoveringAggregateIndex.

@Nullable
public RecordQueryCoveringIndexPlan planCoveringAggregateIndex(@Nonnull RecordQuery query, @Nonnull Index index, @Nonnull KeyExpression indexExpr) {
    final Collection<RecordType> recordTypes = metaData.recordTypesForIndex(index);
    if (recordTypes.size() != 1) {
        // Unfortunately, since we materialize partial records, we need a unique type for them.
        return null;
    }
    final RecordType recordType = recordTypes.iterator().next();
    final PlanContext planContext = getPlanContext(query);
    planContext.rankComparisons = new RankComparisons(query.getFilter(), planContext.indexes);
    // Repeated fields will be scanned one at a time by covering aggregate, so there is no issue with fan out.
    planContext.allowDuplicates = true;
    final CandidateScan candidateScan = new CandidateScan(planContext, index, query.isSortReverse());
    final ScoredPlan scoredPlan = planCandidateScan(candidateScan, indexExpr, BooleanNormalizer.forConfiguration(configuration).normalizeIfPossible(query.getFilter()), query.getSort());
    // It would be possible to handle unsatisfiedFilters if they, too, only involved group key (covering) fields.
    if (scoredPlan == null || !scoredPlan.unsatisfiedFilters.isEmpty() || !(scoredPlan.plan instanceof RecordQueryIndexPlan)) {
        return null;
    }
    final IndexKeyValueToPartialRecord.Builder builder = IndexKeyValueToPartialRecord.newBuilder(recordType);
    final List<KeyExpression> keyFields = index.getRootExpression().normalizeKeyForPositions();
    final List<KeyExpression> valueFields = Collections.emptyList();
    for (KeyExpression resultField : query.getRequiredResults()) {
        if (!addCoveringField(resultField, builder, keyFields, valueFields)) {
            return null;
        }
    }
    builder.addRequiredMessageFields();
    if (!builder.isValid(true)) {
        return null;
    }
    RecordQueryIndexPlan plan = (RecordQueryIndexPlan) scoredPlan.plan;
    IndexScanParameters scanParameters = new IndexScanComparisons(IndexScanType.BY_GROUP, plan.getComparisons());
    plan = new RecordQueryIndexPlan(plan.getIndexName(), scanParameters, plan.isReverse());
    return new RecordQueryCoveringIndexPlan(plan, recordType.getName(), AvailableFields.NO_FIELDS, builder.build());
}
Also used : IndexScanParameters(com.apple.foundationdb.record.provider.foundationdb.IndexScanParameters) RankComparisons(com.apple.foundationdb.record.query.plan.planning.RankComparisons) IndexScanComparisons(com.apple.foundationdb.record.provider.foundationdb.IndexScanComparisons) RecordQueryIndexPlan(com.apple.foundationdb.record.query.plan.plans.RecordQueryIndexPlan) 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) RecordQueryCoveringIndexPlan(com.apple.foundationdb.record.query.plan.plans.RecordQueryCoveringIndexPlan) RecordType(com.apple.foundationdb.record.metadata.RecordType) Nullable(javax.annotation.Nullable)

Example 32 with RecordType

use of com.apple.foundationdb.record.metadata.RecordType in project fdb-record-layer by FoundationDB.

the class RecordQueryPlanner method getPlanContext.

@Nonnull
private PlanContext getPlanContext(@Nonnull RecordQuery query) {
    final List<Index> indexes = new ArrayList<>();
    @Nullable final KeyExpression commonPrimaryKey;
    recordStoreState.beginRead();
    try {
        if (query.getRecordTypes().isEmpty()) {
            // ALL_TYPES
            commonPrimaryKey = RecordMetaData.commonPrimaryKey(metaData.getRecordTypes().values());
        } else {
            final List<RecordType> recordTypes = query.getRecordTypes().stream().map(metaData::getRecordType).collect(Collectors.toList());
            if (recordTypes.size() == 1) {
                final RecordType recordType = recordTypes.get(0);
                indexes.addAll(readableOf(recordType.getIndexes()));
                indexes.addAll(readableOf(recordType.getMultiTypeIndexes()));
                commonPrimaryKey = recordType.getPrimaryKey();
            } else {
                boolean first = true;
                for (RecordType recordType : recordTypes) {
                    if (first) {
                        indexes.addAll(readableOf(recordType.getMultiTypeIndexes()));
                        first = false;
                    } else {
                        indexes.retainAll(readableOf(recordType.getMultiTypeIndexes()));
                    }
                }
                commonPrimaryKey = RecordMetaData.commonPrimaryKey(recordTypes);
            }
        }
        indexes.addAll(readableOf(metaData.getUniversalIndexes()));
    } finally {
        recordStoreState.endRead();
    }
    indexes.removeIf(query.hasAllowedIndexes() ? index -> !query.getAllowedIndexes().contains(index.getName()) : index -> !query.getIndexQueryabilityFilter().isQueryable(index));
    return new PlanContext(query, indexes, commonPrimaryKey);
}
Also used : 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) RecordType(com.apple.foundationdb.record.metadata.RecordType) ArrayList(java.util.ArrayList) 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) RecordQueryPlanWithIndex(com.apple.foundationdb.record.query.plan.plans.RecordQueryPlanWithIndex) Index(com.apple.foundationdb.record.metadata.Index) Nullable(javax.annotation.Nullable) Nonnull(javax.annotation.Nonnull)

Example 33 with RecordType

use of com.apple.foundationdb.record.metadata.RecordType in project fdb-record-layer by FoundationDB.

the class BindingFunctions method javaComparisonType.

@Nullable
private static Descriptors.FieldDescriptor.JavaType javaComparisonType(@Nonnull QueryComponent fieldComparison, @Nonnull Index index, @Nonnull RecordMetaData metaData) {
    Descriptors.FieldDescriptor.JavaType javaType = null;
    for (RecordType recordType : metaData.recordTypesForIndex(index)) {
        Descriptors.Descriptor descriptor = recordType.getDescriptor();
        QueryComponent component = fieldComparison;
        while (component instanceof NestedField) {
            Descriptors.FieldDescriptor fieldDescriptor = descriptor.findFieldByName(((NestedField) component).getName());
            if (fieldDescriptor == null) {
                return null;
            }
            descriptor = fieldDescriptor.getMessageType();
            component = ((NestedField) component).getChild();
        }
        if (component instanceof FieldWithComparison) {
            Descriptors.FieldDescriptor fieldDescriptor = descriptor.findFieldByName(((FieldWithComparison) component).getName());
            if (fieldDescriptor == null) {
                return null;
            }
            if (javaType == null) {
                javaType = fieldDescriptor.getJavaType();
            } else if (javaType != fieldDescriptor.getJavaType()) {
                return null;
            }
        } else {
            return null;
        }
    }
    return javaType;
}
Also used : NestedField(com.apple.foundationdb.record.query.expressions.NestedField) QueryComponent(com.apple.foundationdb.record.query.expressions.QueryComponent) RecordType(com.apple.foundationdb.record.metadata.RecordType) FieldWithComparison(com.apple.foundationdb.record.query.expressions.FieldWithComparison) Descriptors(com.google.protobuf.Descriptors) Nullable(javax.annotation.Nullable)

Example 34 with RecordType

use of com.apple.foundationdb.record.metadata.RecordType in project fdb-record-layer by FoundationDB.

the class QueryPlanUtils method getCoveringIndexEntryToPartialRecordFunction.

/**
 * The method to get a function from an {@link IndexEntry} to a {@link FDBQueriedRecord} representing a partial record.
 */
@SuppressWarnings("unchecked")
public static <M extends Message> Function<IndexEntry, FDBQueriedRecord<M>> getCoveringIndexEntryToPartialRecordFunction(@Nonnull final FDBRecordStoreBase<M> store, @Nonnull final String recordTypeName, @Nonnull final String indexName, @Nonnull final IndexKeyValueToPartialRecord toRecord, @Nonnull final IndexScanType scanType) {
    final RecordMetaData metaData = store.getRecordMetaData();
    final RecordType recordType = metaData.getRecordType(recordTypeName);
    final Index index = metaData.getIndex(indexName);
    final Descriptors.Descriptor recordDescriptor = recordType.getDescriptor();
    boolean hasPrimaryKey = scanType != IndexScanType.BY_GROUP && scanType != IndexScanType.BY_LUCENE_AUTO_COMPLETE && scanType != IndexScanType.BY_LUCENE_SPELLCHECK;
    return indexEntry -> store.coveredIndexQueriedRecord(index, indexEntry, recordType, (M) toRecord.toRecord(recordDescriptor, indexEntry), hasPrimaryKey);
}
Also used : IndexEntry(com.apple.foundationdb.record.IndexEntry) RecordMetaData(com.apple.foundationdb.record.RecordMetaData) IndexScanType(com.apple.foundationdb.record.IndexScanType) RecordType(com.apple.foundationdb.record.metadata.RecordType) IndexKeyValueToPartialRecord(com.apple.foundationdb.record.query.plan.IndexKeyValueToPartialRecord) Index(com.apple.foundationdb.record.metadata.Index) Descriptors(com.google.protobuf.Descriptors) FDBQueriedRecord(com.apple.foundationdb.record.provider.foundationdb.FDBQueriedRecord) Message(com.google.protobuf.Message) Nonnull(javax.annotation.Nonnull) Function(java.util.function.Function) FDBRecordStoreBase(com.apple.foundationdb.record.provider.foundationdb.FDBRecordStoreBase) RecordMetaData(com.apple.foundationdb.record.RecordMetaData) RecordType(com.apple.foundationdb.record.metadata.RecordType) Index(com.apple.foundationdb.record.metadata.Index) Descriptors(com.google.protobuf.Descriptors)

Example 35 with RecordType

use of com.apple.foundationdb.record.metadata.RecordType in project fdb-record-layer by FoundationDB.

the class FDBRecordStore method updateSecondaryIndexes.

@Nonnull
private <M extends Message> CompletableFuture<Void> updateSecondaryIndexes(@Nullable final FDBStoredRecord<M> oldRecord, @Nullable final FDBStoredRecord<M> newRecord) {
    if (oldRecord == null && newRecord == null) {
        return AsyncUtil.DONE;
    }
    if (recordStoreStateRef.get() == null) {
        return preloadRecordStoreStateAsync().thenCompose(vignore -> updateSecondaryIndexes(oldRecord, newRecord));
    }
    final List<CompletableFuture<Void>> futures = new ArrayList<>();
    final RecordType sameRecordType;
    if (oldRecord == null) {
        sameRecordType = newRecord.getRecordType();
    } else if (newRecord == null) {
        sameRecordType = oldRecord.getRecordType();
    } else if (oldRecord.getRecordType() == newRecord.getRecordType()) {
        sameRecordType = newRecord.getRecordType();
    } else {
        sameRecordType = null;
    }
    beginRecordStoreStateRead();
    boolean haveFuture = false;
    try {
        if (sameRecordType != null) {
            updateSecondaryIndexes(oldRecord, newRecord, futures, getEnabledIndexes(sameRecordType));
            updateSecondaryIndexes(oldRecord, newRecord, futures, getEnabledUniversalIndexes());
            updateSecondaryIndexes(oldRecord, newRecord, futures, getEnabledMultiTypeIndexes(sameRecordType));
        } else {
            final List<Index> oldIndexes = new ArrayList<>();
            if (oldRecord != null) {
                final RecordType oldRecordType = oldRecord.getRecordType();
                oldIndexes.addAll(getEnabledIndexes(oldRecordType));
                oldIndexes.addAll(getEnabledUniversalIndexes());
                oldIndexes.addAll(getEnabledMultiTypeIndexes(oldRecordType));
            }
            List<Index> newIndexes = new ArrayList<>();
            if (newRecord != null) {
                final RecordType newRecordType = newRecord.getRecordType();
                newIndexes.addAll(getEnabledIndexes(newRecordType));
                newIndexes.addAll(getEnabledUniversalIndexes());
                newIndexes.addAll(getEnabledMultiTypeIndexes(newRecordType));
            }
            List<Index> commonIndexes = new ArrayList<>(oldIndexes);
            commonIndexes.retainAll(newIndexes);
            oldIndexes.removeAll(commonIndexes);
            newIndexes.removeAll(commonIndexes);
            updateSecondaryIndexes(oldRecord, null, futures, oldIndexes);
            updateSecondaryIndexes(null, newRecord, futures, newIndexes);
            updateSecondaryIndexes(oldRecord, newRecord, futures, commonIndexes);
        }
        if (!getRecordMetaData().getSyntheticRecordTypes().isEmpty()) {
            updateSyntheticIndexes(oldRecord, newRecord, futures);
        }
        haveFuture = true;
    } finally {
        if (!haveFuture) {
            endRecordStoreStateRead();
        }
    }
    if (futures.isEmpty()) {
        endRecordStoreStateRead();
        return AsyncUtil.DONE;
    } else if (futures.size() == 1) {
        return futures.get(0).whenComplete((v, t) -> endRecordStoreStateRead());
    } else {
        return AsyncUtil.whenAll(futures).whenComplete((v, t) -> endRecordStoreStateRead());
    }
}
Also used : LogMessageKeys(com.apple.foundationdb.record.logging.LogMessageKeys) UnaryOperator(java.util.function.UnaryOperator) MetaDataException(com.apple.foundationdb.record.metadata.MetaDataException) RecordSerializer(com.apple.foundationdb.record.provider.common.RecordSerializer) Subspace(com.apple.foundationdb.subspace.Subspace) MutationType(com.apple.foundationdb.MutationType) RecordCoreException(com.apple.foundationdb.record.RecordCoreException) Map(java.util.Map) RecordIndexUniquenessViolation(com.apple.foundationdb.record.RecordIndexUniquenessViolation) QueryToKeyMatcher(com.apple.foundationdb.record.query.QueryToKeyMatcher) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) Query(com.apple.foundationdb.record.query.expressions.Query) KeyExpression(com.apple.foundationdb.record.metadata.expressions.KeyExpression) Set(java.util.Set) TupleRange(com.apple.foundationdb.record.TupleRange) KeySpacePath(com.apple.foundationdb.record.provider.foundationdb.keyspace.KeySpacePath) ByteOrder(java.nio.ByteOrder) SyntheticRecordType(com.apple.foundationdb.record.metadata.SyntheticRecordType) RecordMetaDataProvider(com.apple.foundationdb.record.RecordMetaDataProvider) RecordStoreState(com.apple.foundationdb.record.RecordStoreState) TupleHelpers(com.apple.foundationdb.tuple.TupleHelpers) API(com.apple.foundationdb.annotation.API) FunctionNames(com.apple.foundationdb.record.FunctionNames) RecordMetaData(com.apple.foundationdb.record.RecordMetaData) IndexAggregateFunction(com.apple.foundationdb.record.metadata.IndexAggregateFunction) AsyncUtil(com.apple.foundationdb.async.AsyncUtil) RecordQuery(com.apple.foundationdb.record.query.RecordQuery) RangeSet(com.apple.foundationdb.async.RangeSet) RecordQueryPlan(com.apple.foundationdb.record.query.plan.plans.RecordQueryPlan) Supplier(java.util.function.Supplier) FormerIndex(com.apple.foundationdb.record.metadata.FormerIndex) ArrayList(java.util.ArrayList) ByteScanLimiter(com.apple.foundationdb.record.ByteScanLimiter) ParameterRelationshipGraph(com.apple.foundationdb.record.query.ParameterRelationshipGraph) LoggableException(com.apple.foundationdb.util.LoggableException) CloseableAsyncIterator(com.apple.foundationdb.async.CloseableAsyncIterator) IndexRecordFunction(com.apple.foundationdb.record.metadata.IndexRecordFunction) Nullable(javax.annotation.Nullable) ByteArrayUtil2(com.apple.foundationdb.tuple.ByteArrayUtil2) IsolationLevel(com.apple.foundationdb.record.IsolationLevel) CursorLimitManager(com.apple.foundationdb.record.cursors.CursorLimitManager) ExecuteState(com.apple.foundationdb.record.ExecuteState) AtomicLong(java.util.concurrent.atomic.AtomicLong) RecordType(com.apple.foundationdb.record.metadata.RecordType) Index(com.apple.foundationdb.record.metadata.Index) DynamicMessageRecordSerializer(com.apple.foundationdb.record.provider.common.DynamicMessageRecordSerializer) SyntheticRecordPlanner(com.apple.foundationdb.record.query.plan.synthetic.SyntheticRecordPlanner) IndexEntry(com.apple.foundationdb.record.IndexEntry) LoggerFactory(org.slf4j.LoggerFactory) RecordCoreStorageException(com.apple.foundationdb.record.RecordCoreStorageException) ByteBuffer(java.nio.ByteBuffer) RecordQueryPlanner(com.apple.foundationdb.record.query.plan.RecordQueryPlanner) Transaction(com.apple.foundationdb.Transaction) Tuple(com.apple.foundationdb.tuple.Tuple) Range(com.apple.foundationdb.Range) KeyValueLogMessage(com.apple.foundationdb.record.logging.KeyValueLogMessage) PipelineOperation(com.apple.foundationdb.record.PipelineOperation) RecordMetaDataProto(com.apple.foundationdb.record.RecordMetaDataProto) ByteArrayUtil(com.apple.foundationdb.tuple.ByteArrayUtil) KeyValue(com.apple.foundationdb.KeyValue) ImmutableMap(com.google.common.collect.ImmutableMap) Predicate(java.util.function.Predicate) Collection(java.util.Collection) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) IndexQueryabilityFilter(com.apple.foundationdb.record.query.IndexQueryabilityFilter) AndComponent(com.apple.foundationdb.record.query.expressions.AndComponent) RecordCoreArgumentException(com.apple.foundationdb.record.RecordCoreArgumentException) Collectors(java.util.stream.Collectors) ByteString(com.google.protobuf.ByteString) List(java.util.List) EvaluationContext(com.apple.foundationdb.record.EvaluationContext) AggregateFunctionNotSupportedException(com.apple.foundationdb.record.AggregateFunctionNotSupportedException) RecordTypeKeyComparison(com.apple.foundationdb.record.query.expressions.RecordTypeKeyComparison) IndexTypes(com.apple.foundationdb.record.metadata.IndexTypes) Optional(java.util.Optional) MutableRecordStoreState(com.apple.foundationdb.record.MutableRecordStoreState) RecordTypeOrBuilder(com.apple.foundationdb.record.metadata.RecordTypeOrBuilder) SyntheticRecordFromStoredRecordPlan(com.apple.foundationdb.record.query.plan.synthetic.SyntheticRecordFromStoredRecordPlan) SpotBugsSuppressWarnings(com.apple.foundationdb.annotation.SpotBugsSuppressWarnings) Descriptors(com.google.protobuf.Descriptors) AsyncIterator(com.apple.foundationdb.async.AsyncIterator) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) AtomicReference(java.util.concurrent.atomic.AtomicReference) Function(java.util.function.Function) CursorStreamingMode(com.apple.foundationdb.record.CursorStreamingMode) Key(com.apple.foundationdb.record.metadata.Key) ExecuteProperties(com.apple.foundationdb.record.ExecuteProperties) EndpointType(com.apple.foundationdb.record.EndpointType) ScanProperties(com.apple.foundationdb.record.ScanProperties) Suppliers(com.google.common.base.Suppliers) LinkedList(java.util.LinkedList) Nonnull(javax.annotation.Nonnull) EmptyKeyExpression(com.apple.foundationdb.record.metadata.expressions.EmptyKeyExpression) MoreAsyncUtil(com.apple.foundationdb.async.MoreAsyncUtil) Logger(org.slf4j.Logger) Iterator(java.util.Iterator) IndexState(com.apple.foundationdb.record.IndexState) StoreRecordFunction(com.apple.foundationdb.record.metadata.StoreRecordFunction) ReadTransaction(com.apple.foundationdb.ReadTransaction) AsyncIterable(com.apple.foundationdb.async.AsyncIterable) FDBRecordStoreStateCache(com.apple.foundationdb.record.provider.foundationdb.storestate.FDBRecordStoreStateCache) Message(com.google.protobuf.Message) RecordCursor(com.apple.foundationdb.record.RecordCursor) QueryComponent(com.apple.foundationdb.record.query.expressions.QueryComponent) VisibleForTesting(com.google.common.annotations.VisibleForTesting) Collections(java.util.Collections) CompletableFuture(java.util.concurrent.CompletableFuture) SyntheticRecordType(com.apple.foundationdb.record.metadata.SyntheticRecordType) RecordType(com.apple.foundationdb.record.metadata.RecordType) ArrayList(java.util.ArrayList) FormerIndex(com.apple.foundationdb.record.metadata.FormerIndex) Index(com.apple.foundationdb.record.metadata.Index) Nonnull(javax.annotation.Nonnull)

Aggregations

RecordType (com.apple.foundationdb.record.metadata.RecordType)43 Nonnull (javax.annotation.Nonnull)29 Index (com.apple.foundationdb.record.metadata.Index)25 KeyExpression (com.apple.foundationdb.record.metadata.expressions.KeyExpression)24 RecordMetaData (com.apple.foundationdb.record.RecordMetaData)20 Nullable (javax.annotation.Nullable)20 Descriptors (com.google.protobuf.Descriptors)18 SyntheticRecordType (com.apple.foundationdb.record.metadata.SyntheticRecordType)17 ArrayList (java.util.ArrayList)17 RecordCoreException (com.apple.foundationdb.record.RecordCoreException)16 Tuple (com.apple.foundationdb.tuple.Tuple)16 List (java.util.List)15 Collection (java.util.Collection)14 API (com.apple.foundationdb.annotation.API)13 IndexEntry (com.apple.foundationdb.record.IndexEntry)13 Collectors (java.util.stream.Collectors)13 RecordCoreArgumentException (com.apple.foundationdb.record.RecordCoreArgumentException)12 TupleRange (com.apple.foundationdb.record.TupleRange)12 MetaDataException (com.apple.foundationdb.record.metadata.MetaDataException)12 CompletableFuture (java.util.concurrent.CompletableFuture)12