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;
}
Aggregations