Examples of RunLengthEncodedBlock


Examples of com.facebook.presto.block.rle.RunLengthEncodedBlock

                newPages[i] = page;
            }
            else {
                Block[] newBlocks = new Block[page.getChannelCount() + offset];
                for (int channel = 0; channel < offset; channel++) {
                    newBlocks[channel] = new RunLengthEncodedBlock(NULL_BOOLEAN_TUPLE, page.getPositionCount());
                }
                for (int channel = 0; channel < page.getBlocks().length; channel++) {
                    newBlocks[channel + offset] = page.getBlocks()[channel];
                }
                newPages[i] = new Page(page.getPositionCount(), newBlocks);
View Full Code Here

Examples of com.facebook.presto.block.rle.RunLengthEncodedBlock

    @Test
    public void testAllPositionsNull()
            throws Exception
    {
        Block block = new RunLengthEncodedBlock(nullTuple(getSequenceBlock(0, 10).getTupleInfo()), 10);
        assertAggregation(getFunction(), getExpectedValueIncludingNulls(0, 0, 10), 10, block);
    }
View Full Code Here

Examples of com.facebook.presto.block.rle.RunLengthEncodedBlock

    {
        Block value = BOOLEAN.createBlockBuilder(new BlockBuilderStatus())
                .appendNull()
                .build();

        return new RunLengthEncodedBlock(value, positionCount);
    }
View Full Code Here

Examples of com.facebook.presto.block.rle.RunLengthEncodedBlock

        Type type = getSequenceBlock(0, 10).getType();
        Block nullValueBlock = type.createBlockBuilder(new BlockBuilderStatus())
                .appendNull()
                .build();

        Block block = new RunLengthEncodedBlock(nullValueBlock, 10);
        testAggregation(getExpectedValueIncludingNulls(0, 0, 10), block);
    }
View Full Code Here

Examples of com.facebook.presto.block.rle.RunLengthEncodedBlock

    @Test
    public void testAllPositionsNull()
            throws Exception
    {
        Block block = new RunLengthEncodedBlock(nullTuple(getSequenceBlock(0, 10).getTupleInfo()), 10);
        assertAggregation(getFunction(), getConfidence(), getExpectedValueIncludingNulls(0, 0, 10), 10, block);
    }
View Full Code Here

Examples of com.facebook.presto.block.rle.RunLengthEncodedBlock

                newPages[i] = page;
            }
            else {
                Block[] newBlocks = new Block[page.getChannelCount() + offset];
                for (int channel = 0; channel < offset; channel++) {
                    newBlocks[channel] = new RunLengthEncodedBlock(NULL_BOOLEAN_TUPLE, page.getPositionCount());
                }
                for (int channel = 0; channel < page.getBlocks().length; channel++) {
                    newBlocks[channel + offset] = page.getBlocks()[channel];
                }
                newPages[i] = new Page(page.getPositionCount(), newBlocks);
View Full Code Here

Examples of com.facebook.presto.block.rle.RunLengthEncodedBlock

            valuesBlock = new UncompressedBlock(0, SINGLE_DOUBLE, EMPTY_SLICE);
            percentilesBlock = new UncompressedBlock(0, SINGLE_DOUBLE, EMPTY_SLICE);
        }
        else {
            valuesBlock = createDoublesBlock(values);
            percentilesBlock = new RunLengthEncodedBlock(createTuple(percentile), values.length);
        }

        return new Page(valuesBlock, percentilesBlock);
    }
View Full Code Here

Examples of com.facebook.presto.block.rle.RunLengthEncodedBlock

            valuesBlock = new UncompressedBlock(0, SINGLE_LONG, EMPTY_SLICE);
            percentilesBlock = new UncompressedBlock(0, SINGLE_DOUBLE, EMPTY_SLICE);
        }
        else {
            valuesBlock = createLongsBlock(values);
            percentilesBlock = new RunLengthEncodedBlock(createTuple(percentile), values.length);
        }

        return new Page(valuesBlock, percentilesBlock);
    }
View Full Code Here

Examples of com.facebook.presto.block.rle.RunLengthEncodedBlock

            percentilesBlock = new UncompressedBlock(0, SINGLE_DOUBLE, EMPTY_SLICE);
        }
        else {
            valuesBlock = createLongsBlock(values);
            weightsBlock = createLongsBlock(weights);
            percentilesBlock = new RunLengthEncodedBlock(createTuple(percentile), values.length);
        }

        return new Page(valuesBlock, weightsBlock, percentilesBlock);
    }
View Full Code Here

Examples of com.facebook.presto.block.rle.RunLengthEncodedBlock

            percentilesBlock = new UncompressedBlock(0, SINGLE_DOUBLE, EMPTY_SLICE);
        }
        else {
            valuesBlock = createDoublesBlock(values);
            weightsBlock = createLongsBlock(weights);
            percentilesBlock = new RunLengthEncodedBlock(createTuple(percentile), values.length);
        }

        return new Page(valuesBlock, weightsBlock, percentilesBlock);
    }
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.