Package com.facebook.presto.spi.block

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


                }

                for (int column = 0; column < types.size(); column++) {
                    BlockBuilder output = pageBuilder.getBlockBuilder(column);
                    if (cursor.isNull(column)) {
                        output.appendNull();
                    }
                    else {
                        Type type = getTypes().get(column);
                        Class<?> javaType = type.getJavaType();
                        if (javaType == boolean.class) {
View Full Code Here


        channelSet.setCurrentValue(probeJoinCursor);

        for (int position = 0; position < page.getPositionCount(); position++) {
            checkState(probeJoinCursor.advanceNextPosition());
            if (probeJoinCursor.isNull()) {
                blockBuilder.appendNull();
            }
            else {
                boolean contains = channelSet.containsCurrentValue();
                if (!contains && channelSet.containsNull()) {
                    blockBuilder.appendNull();
View Full Code Here

                blockBuilder.appendNull();
            }
            else {
                boolean contains = channelSet.containsCurrentValue();
                if (!contains && channelSet.containsNull()) {
                    blockBuilder.appendNull();
                }
                else {
                    blockBuilder.appendBoolean(contains);
                }
            }
View Full Code Here

        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

        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

        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

        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

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

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

        BlockBuilder builder = builders.get(channel);

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

    private Block createAlternatingNullsBlock(Block testBlock)
    {
        BlockBuilder nullsBlockBuilder = type.createBlockBuilder(new BlockBuilderStatus());
        for (int position = 0; position < testBlock.getPositionCount(); position++) {
            if (type.getJavaType() == void.class) {
                nullsBlockBuilder.appendNull();
            }
            else if (type.getJavaType() == boolean.class) {
                type.writeBoolean(nullsBlockBuilder, type.getBoolean(testBlock, position));
            }
            else if (type.getJavaType() == long.class) {
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.