Package com.facebook.presto.jdbc.internal.airlift.slice

Examples of com.facebook.presto.jdbc.internal.airlift.slice.Slice


    {
        if (positionOffset < 0 || length < 0 || positionOffset + length > positionCount) {
            throw new IndexOutOfBoundsException("Invalid position " + positionOffset + " in block with " + positionCount + " positions");
        }

        Slice newSlice = slice.slice(positionOffset * fixedSize, length * fixedSize);
        boolean[] newValueIsNull = Arrays.copyOfRange(valueIsNull, positionOffset, positionOffset + length);
        return new FixedWidthBlock(fixedSize, length, newSlice, newValueIsNull);
    }
View Full Code Here


    @Override
    public Block getSingleValueBlock(int position)
    {
        checkReadablePosition(position);

        Slice copy = Slices.copyOf(getRawSlice(), valueOffset(position), fixedSize);

        return new FixedWidthBlock(fixedSize, 1, copy, new boolean[] {isNull(position)});
    }
View Full Code Here

TOP

Related Classes of com.facebook.presto.jdbc.internal.airlift.slice.Slice

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.