fRowType,
Arrays.asList(ExpressionGenerators.field(fRowType, 1),
ExpressionGenerators.field(fRowType, 2)));
// For the index scan retriving rows from the D(test_id) index
IndexBound testIdBound =
new IndexBound(row(dIndexRowType, testId), new SetColumnSelector(0));
IndexKeyRange dTestIdKeyRange =
IndexKeyRange.bounded(dIndexRowType, testIdBound, true, testIdBound, true);
// For the index scan retrieving rows from the F(a, b) index given a D index row
IndexBound abBound = new IndexBound(
new RowBasedUnboundExpressions(
loadFilter.rowType(),
Arrays.asList(
ExpressionGenerators.boundField(dIndexRowType, 0, 1),
ExpressionGenerators.boundField(dIndexRowType, 0, 2)), true),
new SetColumnSelector(0, 1));
IndexKeyRange fabKeyRange =
IndexKeyRange.bounded(fabIndexRowType, abBound, true, abBound, true);
// Use a bloom filter loaded by loadFilter. Then for each input row, check the filter (projecting
// D rows on (a, b)), and, for positives, check F using an index scan keyed by D.a and D.b.
Operator plan =