use of io.crate.data.BatchIterator in project crate by crate.
the class NestedLoopBatchIteratorsTest method testAntiJoin.
@Test
public void testAntiJoin() throws Exception {
Supplier<BatchIterator<Row>> batchIteratorSupplier = () -> new AntiJoinNLBatchIterator<>(TestingBatchIterators.range(0, 5), TestingBatchIterators.range(2, 4), new CombinedRow(1, 1), getCol0EqCol1JoinCondition());
BatchIteratorTester tester = new BatchIteratorTester(batchIteratorSupplier);
tester.verifyResultAndEdgeCaseBehaviour(antiJoinResult);
}
use of io.crate.data.BatchIterator in project crate by crate.
the class NestedLoopBatchIteratorsTest method testRightJoin.
@Test
public void testRightJoin() throws Exception {
Supplier<BatchIterator<Row>> batchIteratorSupplier = () -> new RightJoinNLBatchIterator<>(TestingBatchIterators.range(0, 4), TestingBatchIterators.range(2, 6), new CombinedRow(1, 1), getCol0EqCol1JoinCondition());
BatchIteratorTester tester = new BatchIteratorTester(batchIteratorSupplier);
tester.verifyResultAndEdgeCaseBehaviour(rightJoinResult);
}
use of io.crate.data.BatchIterator in project crate by crate.
the class NestedLoopBatchIteratorsTest method testSemiJoin.
@Test
public void testSemiJoin() throws Exception {
Supplier<BatchIterator<Row>> batchIteratorSupplier = () -> new SemiJoinNLBatchIterator<>(TestingBatchIterators.range(0, 5), TestingBatchIterators.range(2, 6), new CombinedRow(1, 0), getCol0EqCol1JoinCondition());
BatchIteratorTester tester = new BatchIteratorTester(batchIteratorSupplier);
tester.verifyResultAndEdgeCaseBehaviour(semiJoinResult);
}
use of io.crate.data.BatchIterator in project crate by crate.
the class NestedLoopBatchIteratorsTest method testLeftJoinBatchedSource.
@Test
public void testLeftJoinBatchedSource() throws Exception {
Supplier<BatchIterator<Row>> batchIteratorSupplier = () -> new LeftJoinNLBatchIterator<>(new BatchSimulatingIterator<>(TestingBatchIterators.range(0, 4), 2, 2, null), new BatchSimulatingIterator<>(TestingBatchIterators.range(2, 6), 2, 2, null), new CombinedRow(1, 1), getCol0EqCol1JoinCondition());
BatchIteratorTester tester = new BatchIteratorTester(batchIteratorSupplier);
tester.verifyResultAndEdgeCaseBehaviour(leftJoinResult);
}
use of io.crate.data.BatchIterator in project crate by crate.
the class NestedLoopBatchIteratorsTest method testAntiJoinBatchedSource.
@Test
public void testAntiJoinBatchedSource() throws Exception {
Supplier<BatchIterator<Row>> batchIteratorSupplier = () -> new AntiJoinNLBatchIterator<>(new BatchSimulatingIterator<>(TestingBatchIterators.range(0, 5), 2, 2, null), new BatchSimulatingIterator<>(TestingBatchIterators.range(2, 4), 2, 2, null), new CombinedRow(1, 1), getCol0EqCol1JoinCondition());
BatchIteratorTester tester = new BatchIteratorTester(batchIteratorSupplier);
tester.verifyResultAndEdgeCaseBehaviour(antiJoinResult);
}
Aggregations