Package com.facebook.presto.spi.block

Examples of com.facebook.presto.spi.block.BlockBuilder.appendDouble()


    @Override
    public Block getSequenceBlock(int start, int length)
    {
        BlockBuilder blockBuilder = DOUBLE.createBlockBuilder(new BlockBuilderStatus());
        for (int i = start; i < start + length; i++) {
            blockBuilder.appendDouble((double) i);
        }
        return blockBuilder.build();
    }

    @Override
View Full Code Here


        for (Double value : values) {
            if (value == null) {
                builder.appendNull();
            }
            else {
                builder.appendDouble(value);
            }
        }

        return builder.build();
    }
View Full Code Here

    public static Block createDoubleSequenceBlock(int start, int end)
    {
        BlockBuilder builder = DOUBLE.createBlockBuilder(new BlockBuilderStatus());

        for (int i = start; i < end; i++) {
            builder.appendDouble((double) i);
        }

        return builder.build();
    }
View Full Code Here

    @Override
    public Block getSequenceBlock(int start, int length)
    {
        BlockBuilder blockBuilder = DOUBLE.createBlockBuilder(new BlockBuilderStatus());
        for (int i = start; i < start + length; i++) {
            blockBuilder.appendDouble((double) i);
        }
        return blockBuilder.build();
    }

    @Override
View Full Code Here

    @Override
    public Block getSequenceBlock(int start, int length)
    {
        BlockBuilder blockBuilder = DOUBLE.createBlockBuilder(new BlockBuilderStatus());
        for (int i = start; i < start + length; i++) {
            blockBuilder.appendDouble((double) i);
        }
        return blockBuilder.build();
    }

    @Override
View Full Code Here

    @Override
    public Block getSequenceBlock(int start, int length)
    {
        BlockBuilder blockBuilder = DOUBLE.createBlockBuilder(new BlockBuilderStatus());
        for (int i = start; i < start + length; i++) {
            blockBuilder.appendDouble((double) i);
        }
        return blockBuilder.build();
    }

    @Override
View Full Code Here

            for (Number sample : sampledList.build()) {
                if (getType() == BIGINT) {
                    builder.appendLong(sample.longValue());
                }
                else if (getType() == DOUBLE) {
                    builder.appendDouble(sample.doubleValue());
                }
                else {
                    throw new AssertionError("Can only handle longs and doubles");
                }
            }
View Full Code Here

    @Override
    public Block getSequenceBlock(int start, int length)
    {
        BlockBuilder blockBuilder = DOUBLE.createBlockBuilder(new BlockBuilderStatus());
        for (int i = start; i < start + length; i++) {
            blockBuilder.appendDouble((double) i);
        }
        return blockBuilder.build();
    }

    @Override
View Full Code Here

    @Override
    public Block getSequenceBlock(int start, int length)
    {
        BlockBuilder blockBuilder = DOUBLE.createBlockBuilder(new BlockBuilderStatus());
        for (int i = start; i < start + length; i++) {
            blockBuilder.appendDouble((double) i);
        }
        return blockBuilder.build();
    }

    @Override
View Full Code Here

    @Override
    public Block getSequenceBlock(int start, int length)
    {
        BlockBuilder blockBuilder = DOUBLE.createBlockBuilder(new BlockBuilderStatus());
        for (int i = start; i < start + length; i++) {
            blockBuilder.appendDouble((double) i);
        }
        return blockBuilder.build();
    }

    @Override
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.