Search in sources :

Example 21 with MapBlockBuilder

use of com.facebook.presto.common.block.MapBlockBuilder in project presto by prestodb.

the class TestMapBlock method verifyBlockAndBuilderRegion.

private void verifyBlockAndBuilderRegion(Map<String, Long>[] testValues, MapBlock block, BlockBuilder blockBuilder, int offset, int length) {
    verifyMapRegion(testValues, block, blockBuilder, offset, length);
    // MapBlockBuilder also implements AbstractMapBlock interface, verify it.
    MapBlockBuilder mapBlockBuilder = (MapBlockBuilder) blockBuilder;
    verifyMapRegion(testValues, mapBlockBuilder, blockBuilder, offset, length);
}
Also used : MapBlockBuilder(com.facebook.presto.common.block.MapBlockBuilder)

Aggregations

MapBlockBuilder (com.facebook.presto.common.block.MapBlockBuilder)21 BlockBuilder (com.facebook.presto.common.block.BlockBuilder)14 Test (org.testng.annotations.Test)13 SingleMapBlock (com.facebook.presto.common.block.SingleMapBlock)8 AbstractMapBlock (com.facebook.presto.common.block.AbstractMapBlock)6 MapBlock (com.facebook.presto.common.block.MapBlock)6 MapType (com.facebook.presto.common.type.MapType)5 Slice (io.airlift.slice.Slice)5 ArrayBlockBuilder (com.facebook.presto.common.block.ArrayBlockBuilder)3 Block (com.facebook.presto.common.block.Block)3 RowBlockBuilder (com.facebook.presto.common.block.RowBlockBuilder)3 Slices.utf8Slice (io.airlift.slice.Slices.utf8Slice)3 ColumnarMap (com.facebook.presto.common.block.ColumnarMap)2 ArrayType (com.facebook.presto.common.type.ArrayType)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 Benchmark (org.openjdk.jmh.annotations.Benchmark)2 UsedByGeneratedCode (com.facebook.presto.annotation.UsedByGeneratedCode)1 BlockAssertions.createLongDictionaryBlock (com.facebook.presto.block.BlockAssertions.createLongDictionaryBlock)1 BlockAssertions.createLongsBlock (com.facebook.presto.block.BlockAssertions.createLongsBlock)1