Package com.facebook.presto.tuple

Examples of com.facebook.presto.tuple.Tuple


        while (cursor.advanceNextPosition()) {
            Aggregator function = createAggregator(aggregation(getFunction(), new Input(0, 0)), Step.PARTIAL);
            function.addValue(cursor);
            BlockCursor result = function.getResult().cursor();
            assertTrue(result.advanceNextPosition());
            Tuple tuple = result.getTuple();
            blockBuilder.append(tuple);
        }
        return blockBuilder.build();
    }
View Full Code Here


    {
        int tupleLength = sliceInput.readInt();
        int tupleCount = sliceInput.readInt();

        Slice tupleSlice = sliceInput.readSlice(tupleLength);
        Tuple tuple = new Tuple(tupleSlice, tupleInfo);
        return new RunLengthEncodedBlock(tuple, tupleCount);
    }
View Full Code Here

        // TODO: add Slices.copyOf() to airlift
        Slice copy = Slices.allocate(size);
        copy.setBytes(0, slice, offset, size);

        return new Tuple(copy, SINGLE_VARBINARY);
    }
View Full Code Here

        // TODO: add Slices.copyOf() to airlift
        Slice copy = Slices.allocate(ENTRY_SIZE);
        copy.setBytes(0, slice, offset, ENTRY_SIZE);

        return new Tuple(copy, TupleInfo.SINGLE_LONG);
    }
View Full Code Here

        return dictionary.size();
    }

    public Tuple getTuple(int dictionaryKey)
    {
        return new Tuple(getTupleSlice(dictionaryKey), tupleInfo);
    }
View Full Code Here

        // TODO: add Slices.copyOf() to airlift
        Slice copy = Slices.allocate(ENTRY_SIZE);
        copy.setBytes(0, slice, offset, ENTRY_SIZE);

        return new Tuple(copy, TupleInfo.SINGLE_DOUBLE);
    }
View Full Code Here

        // TODO: add Slices.copyOf() to airlift
        Slice copy = Slices.allocate(ENTRY_SIZE);
        copy.setBytes(0, slice, offset, ENTRY_SIZE);

        return new Tuple(copy, SINGLE_BOOLEAN);
    }
View Full Code Here

        // TODO: add Slices.copyOf() to airlift
        Slice copy = Slices.allocate(size);
        copy.setBytes(0, slice, offset, size);

        return new Tuple(copy, tupleInfo);
    }
View Full Code Here

        // TODO: add Slices.copyOf() to airlift
        Slice copy = Slices.allocate(ENTRY_SIZE);
        copy.setBytes(0, slice, offset, ENTRY_SIZE);

        return new Tuple(copy, TupleInfo.SINGLE_LONG);
    }
View Full Code Here

        return dictionary.size();
    }

    public Tuple getTuple(int dictionaryKey)
    {
        return new Tuple(getTupleSlice(dictionaryKey), tupleInfo);
    }
View Full Code Here

TOP

Related Classes of com.facebook.presto.tuple.Tuple

Copyright © 2018 www.massapicom. 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.