Examples of appendNull()


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

    {
        BlockBuilder blockBuilder = type.createBlockBuilder(new BlockBuilderStatus());

        Class<?> javaType = type.getJavaType();
        if (value == null) {
            blockBuilder.appendNull();
        }
        else if (javaType == boolean.class) {
            type.writeBoolean(blockBuilder, (Boolean) value);
        }
        else if (javaType == long.class) {
View Full Code Here

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

    private Block toBlock(Object value)
    {
        BlockBuilder blockBuilder = type.createBlockBuilder(new BlockBuilderStatus());
        Class<?> javaType = type.getJavaType();
        if (value == null) {
            blockBuilder.appendNull();
        }
        else if (javaType == boolean.class) {
            type.writeBoolean(blockBuilder, (Boolean) value);
        }
        else if (javaType == long.class) {
View Full Code Here

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

    {
        BlockBuilder builder = VARCHAR.createBlockBuilder(new BlockBuilderStatus());

        for (String value : values) {
            if (value == null) {
                builder.appendNull();
            }
            else {
                VARCHAR.writeString(builder, value);
            }
        }
View Full Code Here

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

    {
        BlockBuilder builder = BOOLEAN.createBlockBuilder(new BlockBuilderStatus());

        for (Boolean value : values) {
            if (value == null) {
                builder.appendNull();
            }
            else {
                BOOLEAN.writeBoolean(builder, value);
            }
        }
View Full Code Here

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

    {
        BlockBuilder builder = BIGINT.createBlockBuilder(new BlockBuilderStatus());

        for (Long value : values) {
            if (value == null) {
                builder.appendNull();
            }
            else {
                BIGINT.writeLong(builder, value);
            }
        }
View Full Code Here

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

    {
        BlockBuilder builder = DOUBLE.createBlockBuilder(new BlockBuilderStatus());

        for (Double value : values) {
            if (value == null) {
                builder.appendNull();
            }
            else {
                DOUBLE.writeDouble(builder, value);
            }
        }
View Full Code Here

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

        BlockBuilder blockBuilder = type.createBlockBuilder(new BlockBuilderStatus());

        for (Object value : values) {
            Class<?> javaType = type.getJavaType();
            if (value == null) {
                blockBuilder.appendNull();
            }
            else if (javaType == boolean.class) {
                type.writeBoolean(blockBuilder, (Boolean) value);
            }
            else if (javaType == long.class) {
View Full Code Here

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

    public Block createAlternatingNullsBlock(Type type, Block sequenceBlock)
    {
        BlockBuilder blockBuilder = type.createBlockBuilder(new BlockBuilderStatus());
        for (int position = 0; position < sequenceBlock.getPositionCount(); position++) {
            // append null
            blockBuilder.appendNull();
            // append value
            type.appendTo(sequenceBlock, position, blockBuilder);
        }
        return blockBuilder.build();
    }
View Full Code Here

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

        public final Block evaluateIntermediate()
        {
            BlockBuilder out = getIntermediateType().createBlockBuilder(new BlockBuilderStatus());

            if (digest.getCount() == 0.0) {
                out.appendNull();
            }
            else {
                DynamicSliceOutput sliceOutput = new DynamicSliceOutput(digest.estimatedSerializedSizeInBytes() + SIZE_OF_DOUBLE);
                // write digest
                digest.serialize(sliceOutput);
View Full Code Here

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

        public final Block evaluateIntermediate()
        {
            BlockBuilder out = getIntermediateType().createBlockBuilder(new BlockBuilderStatus());

            if (digest.getCount() == 0.0) {
                out.appendNull();
            }
            else {
                DynamicSliceOutput sliceOutput = new DynamicSliceOutput(digest.estimatedSerializedSizeInBytes() + SIZE_OF_DOUBLE);
                // write digest
                digest.serialize(sliceOutput);
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.