Package com.facebook.presto.spi.block

Examples of com.facebook.presto.spi.block.VariableWidthBlockBuilder.build()


    private static Block createSingleValueBlock(Slice expectedValue)
    {
        BlockBuilder blockBuilder = new VariableWidthBlockBuilder(new BlockBuilderStatus());
        blockBuilder.writeBytes(expectedValue, 0, expectedValue.length()).closeEntry();
        return blockBuilder.build();
    }
}
View Full Code Here


    {
        VariableWidthBlockBuilder dictionaryBlockBuilder = new VariableWidthBlockBuilder(new BlockBuilderStatus());
        for (Slice expectedValue : dictionary) {
            dictionaryBlockBuilder.writeBytes(expectedValue, 0, expectedValue.length()).closeEntry();
        }
        Block dictionaryBlock = dictionaryBlockBuilder.build();

        Slice[] expectedValues = new Slice[ids.length];
        BlockBuilder idsBlockBuilder = BIGINT.createBlockBuilder(new BlockBuilderStatus());
        for (int i = 0; i < ids.length; i++) {
            Integer id = ids[i];
View Full Code Here

            else {
                blockBuilder.writeBytes(expectedValue, 0, expectedValue.length()).closeEntry();
            }
        }
        assertBlock(blockBuilder, expectedValues);
        assertBlock(blockBuilder.build(), expectedValues);
    }

    private static Slice[] createExpectedValues(int positionCount)
    {
        Slice[] expectedValues = new Slice[positionCount];
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.