Search in sources :

Example 1 with ComposedBitmapIndexQueryPlan

use of com.apple.foundationdb.record.query.plan.bitmap.ComposedBitmapIndexQueryPlan in project fdb-record-layer by FoundationDB.

the class ComposedBitmapIndexMatcher method matchesSafely.

@Override
public boolean matchesSafely(@Nonnull RecordQueryPlan plan) {
    if (!(plan instanceof ComposedBitmapIndexQueryPlan)) {
        return false;
    }
    ComposedBitmapIndexQueryPlan composedBitmapPlan = (ComposedBitmapIndexQueryPlan) plan;
    if (!composerMatcher.matches(composedBitmapPlan.getComposer())) {
        return false;
    }
    List<RecordQueryCoveringIndexPlan> childPlans = composedBitmapPlan.getIndexPlans();
    if (childPlans.size() != childMatchers.size()) {
        return false;
    }
    for (int i = 0; i < childMatchers.size(); i++) {
        if (!childMatchers.get(i).matches(childPlans.get(i))) {
            return false;
        }
    }
    return true;
}
Also used : RecordQueryCoveringIndexPlan(com.apple.foundationdb.record.query.plan.plans.RecordQueryCoveringIndexPlan) ComposedBitmapIndexQueryPlan(com.apple.foundationdb.record.query.plan.bitmap.ComposedBitmapIndexQueryPlan)

Aggregations

ComposedBitmapIndexQueryPlan (com.apple.foundationdb.record.query.plan.bitmap.ComposedBitmapIndexQueryPlan)1 RecordQueryCoveringIndexPlan (com.apple.foundationdb.record.query.plan.plans.RecordQueryCoveringIndexPlan)1