Package com.foundationdb.qp.row

Examples of com.foundationdb.qp.row.ValuesHolderRow


                Row next = sorter.next();
                if(next != null) {
                    assert next.rowType() == bufferRowType;
                    // Common case coming out of default Sorters
                    if(next instanceof ValuesHolderRow) {
                        ValuesHolderRow valuesRow = (ValuesHolderRow)next;
                        RowType realRowType = bufferRowType.second();
                        List<Value> values = valuesRow.values();
                        next = new ValuesHolderRow(realRowType, values.subList(1, realRowType.nFields() + 1));
                    } else if(next instanceof CompoundRow) {
                        next = ((CompoundRow)next).subRow(bufferRowType.second());
                    } else {
                        throw new IllegalStateException("Unexpected Row: " + next.getClass());
                    }
View Full Code Here


        private ValuesHolderRow leftSkipRow()
        {
            if (!leftSkipRowFixed) {
                if (leftSkipRow == null)
                    leftSkipRow = new ValuesHolderRow(leftRowType);
                assert leftRow != null;
                int f = 0;
                while (f < leftFixedFields) {
                    ValueTargets.copyFrom(
                            leftRow.value(f),
View Full Code Here

        private ValuesHolderRow rightSkipRow()
        {
            if (!rightSkipRowFixed) {
                if (rightSkipRow == null)
                    rightSkipRow = new ValuesHolderRow(rightRowType);
                assert rightRow != null;
                int f = 0;
                while (f < rightFixedFields) {
                    ValueTargets.copyFrom(
                            rightRow.value(f),
View Full Code Here

    }

    // Do random accesses instead of sequential. Nearby random accesses are potentially faster.
    private void runRandom(int runs, int sequentialAccessesPerRandom, String label)
    {
        ValuesHolderRow boundRow = new ValuesHolderRow(idxRowType);
        Value valueHolder = boundRow.valueAt(0);
        queryBindings.setRow(0, boundRow);
        IndexBound bound = new IndexBound(boundRow, new SetColumnSelector(0));
        IndexKeyRange keyRange = IndexKeyRange.bounded(idxRowType, bound, true, bound, true);
        Ordering ordering = new Ordering();
        ordering.append(field(idxRowType, 0), true);
View Full Code Here

        @Override
        public Row next() {
            Row inputRow = input.next();
            if(inputRow != null) {
                ValuesHolderRow counterRow = new ValuesHolderRow(bufferRowType.first());
                counterRow.valueAt(0).putInt64(counter++);
                inputRow = new CompoundRow(bufferRowType, counterRow, inputRow);
            }
            return inputRow;
        }
View Full Code Here

                aggregator.input(inputType, inputSource, pAggrTypes.get(i), pAggrsStates.get(i), options.get(i));
            }
        }

        private Row createOutput() {
            ValuesHolderRow outputRow = newOutputRow();
            for(int i = 0; i < inputsIndex; ++i) {
                Value value = outputRow.valueAt(i);
                Value key = keyValues.get(i);
                ValueTargets.copyFrom(key, value);
            }
            for (int i = inputsIndex; i < inputRowType.nFields(); ++i) {
                Value value = outputRow.valueAt(i);
                int aggregatorIndex = i - inputsIndex;
                Value aggregatorState = pAggrsStates.get(aggregatorIndex);
                if (aggregatorState.hasAnyValue())
                    ValueTargets.copyFrom(aggregatorState, value);
                else
View Full Code Here

            return outputRow;
        }

        private Row createEmptyOutput() {
            assert noGroupBy() : "shouldn't be creating null output row when I have a grouping";
            ValuesHolderRow outputRow = newOutputRow();
            for (int i = 0; i < outputRow.rowType().nFields(); ++i) {
                pAggrs.get(i).emptyValue(outputRow.valueAt(i));
            }
            return outputRow;
        }
View Full Code Here

            assert holder == null : holder;
            holder = input;
        }

        private ValuesHolderRow newOutputRow() {
            return new ValuesHolderRow(outputType);
        }
View Full Code Here

        private ValuesHolderRow leftSkipRow()
        {
            if (!leftSkipRowFixed) {
                if (leftSkipRow == null)
                    leftSkipRow = new ValuesHolderRow(rowType());
                assert leftRow != null;
                int f = 0;
                while (f < fixedFields) {
                    ValueTargets.copyFrom(leftRow.value(f), leftSkipRow.valueAt(f));
                    f++;
View Full Code Here

        private ValuesHolderRow rightSkipRow()
        {
            if (!rightSkipRowFixed) {
                if (rightSkipRow == null)
                    rightSkipRow = new ValuesHolderRow(rowType());
                assert rightRow != null;
                int f = 0;
                while (f < fixedFields) {
                    ValueTargets.copyFrom(rightRow.value(f), rightSkipRow.valueAt(f));
                    f++;
View Full Code Here

TOP

Related Classes of com.foundationdb.qp.row.ValuesHolderRow

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.