Search in sources :

Example 6 with FixedColumnDeltaProducer

use of com.questdb.net.ha.producer.FixedColumnDeltaProducer in project questdb by bluestreak01.

the class FixedColumnTest method testEmptyConsumerAndProducer.

@Test
public void testEmptyConsumerAndProducer() {
    FixedColumn col1 = new FixedColumn(file, 4);
    FixedColumn col2 = new FixedColumn(file2, 4);
    FixedColumnDeltaProducer producer = new FixedColumnDeltaProducer(col1);
    producer.configure(col2.size(), col1.size());
    // hasNext() can be true, because of compulsory header
    // however, if column doesn't have data, hasContent() must be false.
    Assert.assertFalse(producer.hasContent());
    Assert.assertEquals(col1.size(), col2.size());
}
Also used : FixedColumnDeltaProducer(com.questdb.net.ha.producer.FixedColumnDeltaProducer) FixedColumn(com.questdb.store.FixedColumn)

Aggregations

FixedColumnDeltaProducer (com.questdb.net.ha.producer.FixedColumnDeltaProducer)6 FixedColumn (com.questdb.store.FixedColumn)6 FixedColumnDeltaConsumer (com.questdb.net.ha.comsumer.FixedColumnDeltaConsumer)3