Examples of appendLong()


Examples of com.facebook.presto.spi.RecordSink.appendLong()

        sink.beginRecord(1);
        sink.appendLong(3);
        sink.finishRecord();

        sink.beginRecord(1);
        sink.appendLong(2);
        sink.finishRecord();

        String fragment = sink.commit();

        // commit the table
View Full Code Here

Examples of com.facebook.presto.spi.RecordSink.appendLong()

        // write the records
        RecordSink sink = recordSinkProvider.getRecordSink(outputHandle);

        sink.beginRecord(8);
        sink.appendLong(2);
        sink.finishRecord();

        sink.beginRecord(5);
        sink.appendLong(3);
        sink.finishRecord();
View Full Code Here

Examples of com.facebook.presto.spi.RecordSink.appendLong()

        sink.beginRecord(8);
        sink.appendLong(2);
        sink.finishRecord();

        sink.beginRecord(5);
        sink.appendLong(3);
        sink.finishRecord();

        sink.beginRecord(7);
        sink.appendLong(4);
        sink.finishRecord();
View Full Code Here

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

        }

        BlockBuilder idBlockBuilder = BIGINT.createBlockBuilder(new BlockBuilderStatus());
        for (int position = 0; position < block.getPositionCount(); position++) {
            int key = dictionaryBuilder.putIfAbsent(position, block);
            idBlockBuilder.appendLong(key);
        }
        idWriter.append(idBlockBuilder.build());

        return this;
    }
View Full Code Here

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

        @Override
        public final Block evaluateFinal()
        {
            BlockBuilder out = getFinalType().createBlockBuilder(new BlockBuilderStatus());

            out.appendLong(count);

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

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

        // Build the sample weight block, and count how many rows of data to copy
        for (int position = 0; position < sampleWeightBlock.getPositionCount() && remainingLimit > 0; position++) {
            rowsToCopy++;
            long sampleWeight = sampleWeightBlock.getLong(position);
            if (sampleWeight <= remainingLimit) {
                builder.appendLong(sampleWeight);
            }
            else {
                builder.appendLong(remainingLimit);
            }
            remainingLimit -= sampleWeight;
View Full Code Here

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

            long sampleWeight = sampleWeightBlock.getLong(position);
            if (sampleWeight <= remainingLimit) {
                builder.appendLong(sampleWeight);
            }
            else {
                builder.appendLong(remainingLimit);
            }
            remainingLimit -= sampleWeight;
        }

        if (remainingLimit >= 0 && rowsToCopy == page.getPositionCount()) {
View Full Code Here

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

        while (!pageBuilder.isFull() && advance()) {
            for (int i = 0; i < blocks.length; i++) {
                BlockBuilder builder = pageBuilder.getBlockBuilder(i);
                if (i == sampleWeightChannel) {
                    if (distinct) {
                        builder.appendLong(1);
                    }
                    else {
                        builder.appendLong(sampleWeight);
                    }
                }
View Full Code Here

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

                if (i == sampleWeightChannel) {
                    if (distinct) {
                        builder.appendLong(1);
                    }
                    else {
                        builder.appendLong(sampleWeight);
                    }
                }
                else {
                    blocks[i].appendTo(position, builder);
                }
View Full Code Here

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

        for (int position = 0; position < page.getPositionCount(); position++) {
            // get the group for the current row
            int groupId = putIfAbsent(position, blocks);

            // output the group id for this row
            blockBuilder.appendLong(groupId);
        }

        Block block = blockBuilder.build();
        return new GroupByIdBlock(nextGroupId, block);
    }
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.