use of io.crate.testing.TestingRowConsumer in project crate by crate.
the class NestedLoopBatchIteratorsTest method testNestedLoopRightEmpty.
@Test
public void testNestedLoopRightEmpty() throws Exception {
BatchIterator<Row> iterator = new CrossJoinNLBatchIterator<>(TestingBatchIterators.range(0, 5), InMemoryBatchIterator.empty(SENTINEL), new CombinedRow(1, 0));
TestingRowConsumer consumer = new TestingRowConsumer();
consumer.accept(iterator, null);
assertThat(consumer.getResult(), Matchers.empty());
}
use of io.crate.testing.TestingRowConsumer in project crate by crate.
the class NestedLoopBatchIteratorsTest method testNestedLoopLeftAndRightEmpty.
@Test
public void testNestedLoopLeftAndRightEmpty() throws Exception {
BatchIterator<Row> iterator = new CrossJoinNLBatchIterator<>(InMemoryBatchIterator.empty(SENTINEL), InMemoryBatchIterator.empty(SENTINEL), new CombinedRow(0, 0));
TestingRowConsumer consumer = new TestingRowConsumer();
consumer.accept(iterator, null);
assertThat(consumer.getResult(), Matchers.empty());
}
use of io.crate.testing.TestingRowConsumer in project crate by crate.
the class NestedLoopBatchIteratorsTest method testNestedLoopLeftEmpty.
@Test
public void testNestedLoopLeftEmpty() throws Exception {
BatchIterator<Row> iterator = new CrossJoinNLBatchIterator<>(InMemoryBatchIterator.empty(SENTINEL), TestingBatchIterators.range(0, 5), new CombinedRow(0, 1));
TestingRowConsumer consumer = new TestingRowConsumer();
consumer.accept(iterator, null);
assertThat(consumer.getResult(), Matchers.empty());
}
use of io.crate.testing.TestingRowConsumer in project crate by crate.
the class CrossJoinBlockNLBatchIteratorTest method testNestedLoopRightEmpty.
@Test
public void testNestedLoopRightEmpty() throws Exception {
BatchIterator<Row> iterator = new CrossJoinBlockNLBatchIterator(left.get(), InMemoryBatchIterator.empty(SENTINEL), new CombinedRow(1, 0), blockSizeCalculator, testingRowAccounting);
TestingRowConsumer consumer = new TestingRowConsumer();
consumer.accept(iterator, null);
assertThat(consumer.getResult(), Matchers.empty());
}
use of io.crate.testing.TestingRowConsumer in project crate by crate.
the class CrossJoinBlockNLBatchIteratorTest method testNestedLoopLeftAndRightEmpty.
@Test
public void testNestedLoopLeftAndRightEmpty() throws Exception {
BatchIterator<Row> iterator = new CrossJoinBlockNLBatchIterator(InMemoryBatchIterator.empty(SENTINEL), InMemoryBatchIterator.empty(SENTINEL), new CombinedRow(0, 0), blockSizeCalculator, testingRowAccounting);
TestingRowConsumer consumer = new TestingRowConsumer();
consumer.accept(iterator, null);
assertThat(consumer.getResult(), Matchers.empty());
}
Aggregations