Operator filterInput =
project_DefaultTest(
groupScan_Default(group(f)),
fRowType,
Arrays.asList(ExpressionGenerators.field(fRowType, 0)));
timeFilterInput = new TimeOperator(filterInput);
// For the index scan retriving rows from the D(x) index
IndexBound dxLo =
new IndexBound(row(dIndexRowType, start), new SetColumnSelector(0));
IndexBound dxHi =
new IndexBound(row(dIndexRowType, Integer.MAX_VALUE), new SetColumnSelector(0));
IndexKeyRange dKeyRange =
IndexKeyRange.bounded(dIndexRowType, dxLo, true, dxHi, false);
// For the index scan retrieving rows from the F(x) index given a D index row
IndexBound fxBound = new IndexBound(
new RowBasedUnboundExpressions(
filterInput.rowType(),
Arrays.asList(ExpressionGenerators.boundField(dIndexRowType, 0, 0)), true),
new SetColumnSelector(0));
IndexKeyRange fKeyRange = IndexKeyRange.bounded(fIndexRowType, fxBound, true, fxBound, true);
// Use a bloom filter loaded by filterInput. Then for each input row, check the filter (projecting
// D rows on (x)), and, for positives, check F using an index scan keyed by D.x.
Operator scanInput = indexScan_Default(dIndexRowType, dKeyRange, new Ordering());
timeScanInput = new TimeOperator(scanInput);
Operator plan =
using_BloomFilter(
// filterInput
timeFilterInput,
// filterRowType