Package com.foundationdb.qp.row

Examples of com.foundationdb.qp.row.Row.rowType()


            Operator plan = indexScan_Default(cSpatialIndexRowType, box, lookaheadQuantum());
            Cursor cursor = API.cursor(plan, queryContext, queryBindings);
            cursor.openTopLevel();
            Row row;
            while ((row = cursor.next()) != null) {
                assertSame(cSpatialIndexRowType.physicalRowType(), row.rowType());
                // Get row state
                int before = getLong(row, 0).intValue();
                long z = getLong(row, 1);
                int pid = getLong(row, 3).intValue();
                int cid = getLong(row, 4).intValue();
View Full Code Here


                    int before = getLong(row, 0).intValue();
                    long z = getLong(row, 1);
                    int pid = getLong(row, 3).intValue();
                    int cid = getLong(row, 4).intValue();
                    // Check against expected
                    assertSame(cSpatialIndexRowType.physicalRowType(), row.rowType());
                    assertEquals(beforeEQ, before);
                    BigDecimal clat = clats.get(cid);
                    BigDecimal clon = clons.get(cid);
                    long zExpected = Spatial.shuffle(space, clat.doubleValue(), clon.doubleValue());
                    assertEquals(zExpected, z);
View Full Code Here

                while((row = input.next()) != null) {
                    ++rowCount;
                    context.checkQueryCancelation();
                    KeyState[] states = createKey(row, rowCount);
                    // Copy instead of hold as ProjectedRow cannot be held
                    ValuesHolderRow rowCopy = new ValuesHolderRow(row.rowType());
                    for(int i = 0 ; i < row.rowType().nFields(); ++i) {
                        ValueTargets.copyFrom(row.value(i), rowCopy.valueAt(i));
                    }
                    navigableMap.put(states, rowCopy);
                    loadTap.out();
View Full Code Here

                    ++rowCount;
                    context.checkQueryCancelation();
                    KeyState[] states = createKey(row, rowCount);
                    // Copy instead of hold as ProjectedRow cannot be held
                    ValuesHolderRow rowCopy = new ValuesHolderRow(row.rowType());
                    for(int i = 0 ; i < row.rowType().nFields(); ++i) {
                        ValueTargets.copyFrom(row.value(i), rowCopy.valueAt(i));
                    }
                    navigableMap.put(states, rowCopy);
                    loadTap.out();
                    loadTap.in();
View Full Code Here

                while ((row == null) && this.isActive()) {
                    row = input.next();
                    if (row == null) {
                        setIdle();
                        row = new ValuesRow(resultType, new Value(MNumeric.BIGINT.instance(false), count));
                    } else if (row.rowType() == countType) {
                        row = null;
                        count++;
                    }
                }
                if (LOG_EXECUTION) {
View Full Code Here

                    if (inputRow == null) {
                        // With inputRow == null, we needed parent to create a left join row if required. That's
                        // been done. set parent to null so that the loop exits.
                        setParent(null);
                    } else {
                        RowType inputRowType = inputRow.rowType();
                        if (inputRowType == parentType) {
                            if (keepParent) {
                                addToPending(inputRow);
                            }
                            setParent(inputRow);
View Full Code Here

        @Override
        public void open() {
            super.open();
            Row rowFromBindings = bindings.getRow(inputBindingPosition);
            assert rowFromBindings.rowType() == rowType : rowFromBindings;
            for (int i = 0; i < hKeys.length; i++) {
                hKeys[i] = rowFromBindings.ancestorHKey(ancestors.get(i));
                cursors[i].rebind(hKeys[i], false);
                cursors[i].open();
            }
View Full Code Here

                checkQueryCancelation();
                Row projectedRow = null;
                Row inputRow;
                if ((inputRow = input.next()) != null) {
                    projectedRow =
                        inputRow.rowType() == rowType
                        ? new ProjectedRow(projectType, inputRow, context, bindings, pEvalExpr)
                        : inputRow;
                }
                if (projectedRow == null) {
                    setIdle();
View Full Code Here

            while (cursor.isActive()) {
                Row row = cursor.next();
                if (row == null) {
                    break;
                }
                RowType rowType = row.rowType();
                Table rowTable = rowType.table();
                int size = tableSize(rowTable);
                if (size < 0)
                    continue;
                try {
View Full Code Here

    }

    protected Row next() {
        Row row = cursor.next();
        if ((row != null) &&
                (row.rowType() != innerRowType)) {
            throw new IllegalArgumentException("wrong row type: " + innerRowType +
                    " != " + row.rowType());
        }
        return row;
    }
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.