Package com.facebook.presto.block.uncompressed

Examples of com.facebook.presto.block.uncompressed.UncompressedBlock.cursor()


    protected void testPartialWithMultiplePositions(Block block, Object expectedValue)
    {
        UncompressedBlock partialsBlock = performPartialAggregation(block);
        Aggregator function = createAggregator(aggregation(getFunction(), new Input(0, 0)), Step.FINAL);
        BlockCursor partialsCursor = partialsBlock.cursor();
        while (partialsCursor.advanceNextPosition()) {
            function.addValue(partialsCursor);
        }

        assertEquals(getActualValue(function), expectedValue);
View Full Code Here


    protected void testVectorPartialWithMultiplePositions(Block block, Object expectedValue)
    {
        UncompressedBlock partialsBlock = performPartialAggregation(block);
        Aggregator function = createAggregator(aggregation(getFunction(), new Input(0, 0)), Step.FINAL);

        BlockCursor blockCursor = partialsBlock.cursor();
        while (blockCursor.advanceNextPosition()) {
            function.addValue(blockCursor);
        }
        assertEquals(getActualValue(function), expectedValue);
    }
View Full Code Here

        // create the block builder for the new boolean column
        // we know the exact size required for the block
        int blockSize = page.getPositionCount() * TupleInfo.SINGLE_BOOLEAN.getFixedSize();
        BlockBuilder blockBuilder = new BlockBuilder(TupleInfo.SINGLE_BOOLEAN, blockSize, Slices.allocate(blockSize).getOutput());

        BlockCursor probeJoinCursor = probeJoinBlock.cursor();
        for (int position = 0; position < page.getPositionCount(); position++) {
            checkState(probeJoinCursor.advanceNextPosition());
            if (probeJoinCursor.isNull(0)) {
                blockBuilder.appendNull();
            }
View Full Code Here

        // create the block builder for the new boolean column
        // we know the exact size required for the block
        int blockSize = page.getPositionCount() * TupleInfo.SINGLE_BOOLEAN.getFixedSize();
        BlockBuilder blockBuilder = new BlockBuilder(TupleInfo.SINGLE_BOOLEAN, blockSize, Slices.allocate(blockSize).getOutput());

        BlockCursor probeJoinCursor = probeJoinBlock.cursor();
        for (int position = 0; position < page.getPositionCount(); position++) {
            checkState(probeJoinCursor.advanceNextPosition());
            if (probeJoinCursor.isNull()) {
                blockBuilder.appendNull();
            }
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.