Package com.foundationdb.qp.row

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


            cursor.openTopLevel();
            Row row;
            long previousDistance = Long.MIN_VALUE;
            int count = 0;
            while ((row = cursor.next()) != null) {
                assertSame(latLonIndexRowType.physicalRowType(), row.rowType());
                long zActual = getLong(row, 0);
                int id = getLong(row, 1).intValue();
                BigDecimal lat = lats.get(id);
                BigDecimal lon = lons.get(id);
                long zExpected = Spatial.shuffle(space, lat.doubleValue(), lon.doubleValue());
View Full Code Here


                cursor.openTopLevel();
                Row row;
                long previousDistance = Long.MIN_VALUE;
                Collection<Integer> actualIdByDistance = new ArrayList<>();
                while ((row = cursor.next()) != null) {
                    assertSame(beforeLatLonIndexRowType.physicalRowType(), row.rowType());
                    int beforeActual = getLong(row, 0).intValue();
                    assertEquals(before, beforeActual);
                    long zActual = getLong(row, 1);
                    int id = getLong(row, 2).intValue();
                    BigDecimal lat = lats.get(id);
View Full Code Here

        Operator plan = indexScan_Default(latLonIndexRowType, box, lookaheadQuantum());
        Cursor cursor = API.cursor(plan, queryContext, queryBindings);
        cursor.openTopLevel();
        Row row;
        while ((row = cursor.next()) != null) {
            assertSame(latLonIndexRowType.physicalRowType(), row.rowType());
            long z = getLong(row, 0);
            Integer expectedId = zToId.get(z);
            assertNotNull(expectedId);
            int id = getLong(row, 1).intValue();
            assertEquals(expectedId.intValue(), id);
View Full Code Here

        Operator plan = indexScan_Default(latLonIndexRowType, box, lookaheadQuantum());
        Cursor cursor = API.cursor(plan, queryContext, queryBindings);
        cursor.openTopLevel();
        Row row;
        while ((row = cursor.next()) != null) {
            assertSame(latLonIndexRowType.physicalRowType(), row.rowType());
            long z = getLong(row, 0);
            Integer expectedId = zToId.get(z);
            assertNotNull(expectedId);
            int id = getLong(row, 1).intValue();
            assertEquals(expectedId.intValue(), id);
View Full Code Here

            PostgresOutputter<Row> outputter = getRowOutputter(context);
            outputter.beforeData();
            if (cursor != null) {
                Row row;
                while ((row = cursor.next()) != null) {
                    assert (getResultRowType() == null) || (row.rowType() == getResultRowType()) : row;
                    outputter.output(row);
                    nrows++;
                    if ((maxrows > 0) && (nrows >= maxrows)) {
                        suspended = true;
                        break;
View Full Code Here

                    Row ancestor = ancestors[i];
                    if (ancestor != null) {
                        // We may have remembered an ancestor with no
                        // children and then this row is an orphan.
                        if (ancestor.ancestorOf(row)) {
                            addFields(ancestor, fieldsByRowType.get(ancestor.rowType()));
                        }
                        else {
                            ancestors[i] = null;
                        }
                    }
View Full Code Here

        }
        try {
            Row row;
            cursor.openTopLevel();
            while((row = cursor.next()) != null) {
                Table aTable = row.rowType().table();
                RowData data = adapter.rowData(aTable.rowDef(), row, new RowDataCreator());
                maintainGroupIndexes(session,
                                     aTable,
                                     aTable.getGroupIndexes(),
                                     data,
View Full Code Here

                }
                if (row == null) {
                    setIdle();
                }
                else  {
                    assert (row.rowType() == inputRowType);
                    Row rowFromBindings = bindings.getRow(bindingPosition);
                    assert (rowFromBindings.rowType() == boundRowType);
                    if (boundRowType == outputRowType) {
                        row = rowFromBindings;
                    }
View Full Code Here

                    setIdle();
                }
                else  {
                    assert (row.rowType() == inputRowType);
                    Row rowFromBindings = bindings.getRow(bindingPosition);
                    assert (rowFromBindings.rowType() == boundRowType);
                    if (boundRowType == outputRowType) {
                        row = rowFromBindings;
                    }
                    else {
                        row = rowFromBindings.subRow(outputRowType);
View Full Code Here

            HashTable hashTable= new HashTable();
            hashTable.setRowType(hashedRowType);
            hashTable.setTComparisons(tComparisons);
            hashTable.setCollators(collators);
            while ((row = loadCursor.next()) != null) {
                assert(row.rowType().equals(hashedRowType));
                hashTable.put(row, evaluatableComparisonFields, bindings);
            }
            loadCursor.closeTopLevel();
            return hashTable;
        }
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.