Search in sources :

Example 31 with TestingRowConsumer

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());
}
Also used : Row(io.crate.data.Row) TestingRowConsumer(io.crate.testing.TestingRowConsumer) Test(org.junit.Test)

Example 32 with TestingRowConsumer

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());
}
Also used : Row(io.crate.data.Row) TestingRowConsumer(io.crate.testing.TestingRowConsumer) Test(org.junit.Test)

Example 33 with TestingRowConsumer

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());
}
Also used : Row(io.crate.data.Row) TestingRowConsumer(io.crate.testing.TestingRowConsumer) Test(org.junit.Test)

Example 34 with TestingRowConsumer

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());
}
Also used : Row(io.crate.data.Row) TestingRowConsumer(io.crate.testing.TestingRowConsumer) Test(org.junit.Test)

Example 35 with TestingRowConsumer

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());
}
Also used : Row(io.crate.data.Row) TestingRowConsumer(io.crate.testing.TestingRowConsumer) Test(org.junit.Test)

Aggregations

TestingRowConsumer (io.crate.testing.TestingRowConsumer)64 Test (org.junit.Test)55 Row (io.crate.data.Row)24 CollectionBucket (io.crate.data.CollectionBucket)11 Bucket (io.crate.data.Bucket)10 CrateDummyClusterServiceUnitTest (io.crate.test.integration.CrateDummyClusterServiceUnitTest)10 InputColumn (io.crate.expression.symbol.InputColumn)6 BatchSimulatingIterator (io.crate.testing.BatchSimulatingIterator)6 ArrayBucket (io.crate.data.ArrayBucket)5 TestingHelpers.isRow (io.crate.testing.TestingHelpers.isRow)5 Streamer (io.crate.Streamer)4 Projector (io.crate.data.Projector)4 GroupingProjector (io.crate.execution.engine.aggregation.GroupingProjector)4 SortingProjector (io.crate.execution.engine.sort.SortingProjector)4 SortingTopNProjector (io.crate.execution.engine.sort.SortingTopNProjector)4 DistResultRXTask (io.crate.execution.jobs.DistResultRXTask)4 ArrayList (java.util.ArrayList)4 RowAccounting (io.crate.breaker.RowAccounting)3 CombinedRow (io.crate.data.join.CombinedRow)3 CompletionException (java.util.concurrent.CompletionException)3