Package com.facebook.presto.spi.type

Examples of com.facebook.presto.spi.type.Type.appendTo()


    public void appendTo(PageBuilder pageBuilder)
    {
        for (int outputIndex = 0; outputIndex < blocks.length; outputIndex++) {
            Type type = types.get(outputIndex);
            Block block = blocks[outputIndex];
            type.appendTo(block, position, pageBuilder.getBlockBuilder(outputIndex));
        }
    }

    @Override
    public long getCurrentJoinPosition()
View Full Code Here


        pageBuilder.reset();
        while (!pageBuilder.isFull() && outputIterator.hasNext()) {
            Block[] next = outputIterator.next();
            for (int i = 0; i < next.length; i++) {
                Type type = types.get(i);
                type.appendTo(next[i], 0, pageBuilder.getBlockBuilder(i));
            }
        }

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

                Block[] next = currentFlushingPartition.next();
                sizeDelta += sizeOfRow(next);
                for (int i = 0; i < outputChannels.length; i++) {
                    int channel = outputChannels[i];
                    Type type = types.get(channel);
                    type.appendTo(next[channel], 0, pageBuilder.getBlockBuilder(i));
                }

                BIGINT.writeLong(pageBuilder.getBlockBuilder(outputChannels.length), currentFlushingPartition.getRowNumber());
            }
            if (!currentFlushingPartition.hasNext()) {
View Full Code Here

    {
        for (int i = 0; i < channels.size(); i++) {
            Type type = types.get(i);
            List<Block> channel = channels.get(i);
            Block block = channel.get(blockIndex);
            type.appendTo(block, position, pageBuilder.getBlockBuilder(outputChannelOffset));
            outputChannelOffset++;
        }
    }

    @Override
View Full Code Here

                    continue;
                }

                for (int channel = 0; channel < types.size(); channel++) {
                    Type type = types.get(channel);
                    type.appendTo(page.getBlock(channel), position, pageBuilder.getBlockBuilder(channel));
                }

                // if page is full, flush
                if (pageBuilder.isFull()) {
                    partitionedPages.add(pageBuilder.build());
View Full Code Here

            // append the row
            for (int i = 0; i < outputChannels.length; i++) {
                int outputChannel = outputChannels[i];
                Type type = types.get(outputChannel);
                Block block = this.channels[outputChannel].get(blockIndex);
                type.appendTo(block, blockPosition, pageBuilder.getBlockBuilder(i));
            }

            position++;
        }
View Full Code Here

        long pageAddress = valueAddresses.getLong(position);

        Type type = types.get(channel);
        Block block = channels[channel].get(decodeSliceIndex(pageAddress));
        int blockPosition = decodePosition(pageAddress);
        type.appendTo(block, blockPosition, output);
    }

    public boolean isNull(int channel, int position)
    {
        long pageAddress = valueAddresses.getLong(position);
View Full Code Here

    {
        for (int i = 0; i < channels.size(); i++) {
            Type type = types.get(i);
            List<Block> channel = channels.get(i);
            Block block = channel.get(blockIndex);
            type.appendTo(block, position, pageBuilder.getBlockBuilder(outputChannelOffset));
            outputChannelOffset++;
        }
    }

    @Override
View Full Code Here

        int intPosition = Ints.checkedCast(position);
        for (int i = 0; i < outputTypes.size(); i++) {
            Type type = outputTypes.get(i);
            Block block = currentPage.getBlock(i);
            BlockBuilder blockBuilder = pageBuilder.getBlockBuilder(i + outputChannelOffset);
            type.appendTo(block, intPosition, blockBuilder);
        }
    }

    @Override
    public void close()
View Full Code Here

        pageBuilder.reset();
        while (!pageBuilder.isFull() && outputIterator.hasNext()) {
            Block[] next = outputIterator.next();
            for (int i = 0; i < next.length; i++) {
                Type type = types.get(i);
                type.appendTo(next[i], 0, pageBuilder.getBlockBuilder(i));
            }
        }

        return pageBuilder.build();
    }
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.