use of io.prestosql.spi.block.RunLengthEncodedBlock in project hetu-core by openlookeng.
the class TestColumnarMap method assertRunLengthEncodedBlock.
private static void assertRunLengthEncodedBlock(Block block, Slice[][][] expectedValues) {
for (int position = 0; position < block.getPositionCount(); position++) {
RunLengthEncodedBlock runLengthEncodedBlock = createTestRleBlock(block, position);
Slice[][][] expectedDictionaryValues = createTestRleExpectedValues(expectedValues, position);
assertBlock(runLengthEncodedBlock, expectedDictionaryValues);
assertColumnarMap(runLengthEncodedBlock, expectedDictionaryValues);
}
}
use of io.prestosql.spi.block.RunLengthEncodedBlock in project hetu-core by openlookeng.
the class TestColumnarRow method assertRunLengthEncodedBlock.
private static <T> void assertRunLengthEncodedBlock(Block block, T[] expectedValues) {
for (int position = 0; position < block.getPositionCount(); position++) {
RunLengthEncodedBlock runLengthEncodedBlock = createTestRleBlock(block, position);
T[] expectedDictionaryValues = createTestRleExpectedValues(expectedValues, position);
assertBlock(runLengthEncodedBlock, expectedDictionaryValues);
assertColumnarRow(runLengthEncodedBlock, expectedDictionaryValues);
}
}
use of io.prestosql.spi.block.RunLengthEncodedBlock in project hetu-core by openlookeng.
the class TestColumnarArray method assertRunLengthEncodedBlock.
private static <T> void assertRunLengthEncodedBlock(Block block, T[] expectedValues) {
for (int position = 0; position < block.getPositionCount(); position++) {
RunLengthEncodedBlock runLengthEncodedBlock = createTestRleBlock(block, position);
T[] expectedDictionaryValues = createTestRleExpectedValues(expectedValues, position);
assertBlock(runLengthEncodedBlock, expectedDictionaryValues);
assertColumnarArray(runLengthEncodedBlock, expectedDictionaryValues);
}
}
use of io.prestosql.spi.block.RunLengthEncodedBlock in project hetu-core by openlookeng.
the class TestDictionaryAwarePageFilter method testRleBlockWithFailure.
@Test
public void testRleBlockWithFailure() {
DictionaryAwarePageFilter filter = createDictionaryAwarePageFilter(true, LongArrayBlock.class);
RunLengthEncodedBlock fail = new RunLengthEncodedBlock(createLongSequenceBlock(-10, -9), 100);
assertThrows(NegativeValueException.class, () -> testFilter(filter, fail, true));
}
use of io.prestosql.spi.block.RunLengthEncodedBlock in project hetu-core by openlookeng.
the class TestDictionaryAwarePageProjection method testRleBlockWithFailure.
@Test(dataProvider = "forceYield")
public void testRleBlockWithFailure(boolean forceYield) {
Block value = createLongSequenceBlock(-43, -42);
RunLengthEncodedBlock block = new RunLengthEncodedBlock(value, 100);
testProjectFails(block, RunLengthEncodedBlock.class, forceYield);
}
Aggregations