IndexBound yTwoBound = new IndexBound(testRow(mdIndex, "y", "two", null, null), new SetColumnSelector(0, 1));
Operator yTwoScan = API.indexScan_Default(mdIndex,
false,
IndexKeyRange.bounded(mdIndex, yTwoBound, true, yTwoBound, true));
TKeyComparable comparableIntBigint = typesRegistryService().getKeyComparable(
ais.getTable(mid).getColumn("report_id").getType().typeClass(),
ais.getTable(rid).getColumn("id").getType().typeClass()
);
Operator innerIntersect = API.intersect_Ordered(
xOneScan,
fooScan,
mdIndex,
rIndex,
mdIndex.index().getAllColumns().size() - 2,
rIndex.index().getAllColumns().size() - 1,
new boolean[]{true},
JoinType.INNER_JOIN,
EnumSet.of(IntersectOption.OUTPUT_LEFT, IntersectOption.SKIP_SCAN),
Arrays.asList(comparableIntBigint.getComparison()),
true
);
Operator outerIntersect = API.intersect_Ordered(
innerIntersect,