Examples of FirstLastNthValueDataContainer


Examples of org.apache.phoenix.util.FirstLastNthValueDataContainer

    }

    @Override
    public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) {

        FirstLastNthValueDataContainer payload = new FirstLastNthValueDataContainer();
        payload.setIsAscending(isAscending);

        payload.setFixedWidthOrderValues(orderByColumn.getDataType().isFixedWidth());
        payload.setFixedWidthDataValues(dataColumn.getDataType().isFixedWidth());

        if (useOffset) {
            payload.setOffset(offset);

            if (topValues.size() == 0) {
                return false;
            }
        } else {
            if (topValue == null) {
                return false;
            }
            topValues.put(topOrder.getValue(), topValue);
        }
        payload.setData(topValues);

        try {
            ptr.set(payload.getPayload());
        } catch (IOException ex) {
            logger.error(ex.getMessage());
            return false;
        }
        return true;
View Full Code Here

Examples of org.apache.phoenix.util.FirstLastNthValueDataContainer

        if (tuple instanceof SingleKeyValueTuple) {
            topValue = ptr.copyBytes();
            return;
        }

        FirstLastNthValueDataContainer payload = new FirstLastNthValueDataContainer();

        payload.setPayload(ptr.copyBytes());
        isAscending = payload.getIsAscending();
        TreeMap serverAggregatorResult = payload.getData();

        if (useOffset) {
            payload.setOffset(offset);
            topValues.putAll(serverAggregatorResult);
        } else {
            Entry<byte[], byte[]> valueEntry = serverAggregatorResult.firstEntry();
            byte[] currentOrder = valueEntry.getKey();
View Full Code Here

Examples of org.apache.phoenix.util.FirstLastNthValueDataContainer

        if (tuple instanceof SingleKeyValueTuple) {
            topValue = ptr.copyBytes();
            return;
        }

        FirstLastNthValueDataContainer payload = new FirstLastNthValueDataContainer();

        payload.setPayload(ptr.copyBytes());
        isAscending = payload.getIsAscending();
        TreeMap serverAggregatorResult = payload.getData();

        if (useOffset) {
            payload.setOffset(offset);
            topValues.putAll(serverAggregatorResult);
        } else {
            Entry<byte[], byte[]> valueEntry = serverAggregatorResult.firstEntry();
            byte[] currentOrder = valueEntry.getKey();
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.