use of com.apple.foundationdb.record.query.plan.plans.RecordQueryInValuesJoinPlan in project fdb-record-layer by FoundationDB.
the class QueryPlanStructuralInstrumentationTest method in.
@Test
public void in() {
final String indexName = "a_field";
final IndexScanParameters scan = IndexScanComparisons.byValue(new ScanComparisons(Arrays.asList(new Comparisons.ParameterComparison(Comparisons.Type.EQUALS, "another_field")), Collections.emptySet()));
final RecordQueryPlan plan = new RecordQueryInValuesJoinPlan(new RecordQueryIndexPlan(indexName, scan, false), "another_field", Bindings.Internal.IN, Arrays.asList(2, 4), false, false);
assertUsesIndexes(plan, Lists.newArrayList(indexName));
final StoreTimer timer = new FDBStoreTimer();
plan.logPlanStructure(timer);
assertEquals(timer.getCount(FDBStoreTimer.Counts.PLAN_IN_VALUES), 1);
assertEquals(timer.getCount(FDBStoreTimer.Counts.PLAN_INDEX), 1);
}
use of com.apple.foundationdb.record.query.plan.plans.RecordQueryInValuesJoinPlan in project fdb-record-layer by FoundationDB.
the class QueryPlanCursorTest method in.
@Test
public void in() throws Exception {
final IndexScanParameters scan = IndexScanComparisons.byValue(new ScanComparisons(Arrays.asList(new Comparisons.ParameterComparison(Comparisons.Type.EQUALS, "in_num")), Collections.emptySet()));
final RecordQueryPlan plan = new RecordQueryInValuesJoinPlan(new RecordQueryIndexPlan("MySimpleRecord$num_value_3_indexed", scan, false), "in_num", Bindings.Internal.IN, Arrays.asList(2, 4), false, false);
compareSkipsAndCursors(plan);
}
Aggregations