Package com.foundationdb.qp.row

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


                    outputter = getRowOutputter(context);
                    outputter.beforeData();
                }
                Row row;
                while ((row = cursor.next()) != null) {
                    assert getResultRowType() == null || (row.rowType() == getResultRowType()) : row;
                    if (outputResult) {
                        outputter.output(row);
                    }
                    rowsModified++;
                    if ((maxrows > 0) && (rowsModified >= maxrows))
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);
                int id = getLong(row, 1).intValue();
                assertEquals(expectedHKey(id), row.hKey().toString());
                actual.add(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);
                int id = getLong(row, 1).intValue();
                assertEquals(expectedHKey(id), row.hKey().toString());
                actual.add(id);
            }
View Full Code Here

                Operator plan = indexScan_Default(beforeLatLonIndexRowType, box, lookaheadQuantum());
                Cursor cursor = API.cursor(plan, queryContext, queryBindings);
                cursor.openTopLevel();
                Row row;
                while ((row = cursor.next()) != null) {
                    assertSame(beforeLatLonIndexRowType.physicalRowType(), row.rowType());
                    int rowBefore = getLong(row, 0).intValue();
                    int rowId = getLong(row, 2).intValue();
                    assertEquals(before, rowBefore);
                    assertEquals(expectedHKey(rowId), row.hKey().toString());
                    actual.add(rowId);
View Full Code Here

            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;
                List<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());
            int id = getLong(row, 1).intValue();
            assertEquals(expectedHKey(id), row.hKey().toString());
            actual.add(id);
        }
        // There should be no false negatives
View Full Code Here

        use(db);
        Operator groupScan = groupScan_Default(coi);
        Cursor cursor = cursor(groupScan, queryContext, queryBindings);
        cursor.openTopLevel();
        Row row = cursor.next();
        assertSame(customerRowType, row.rowType());
        row = cursor.next();
        assertSame(orderRowType, row.rowType());
        // Get and checking each field should work
        assertEquals(Long.valueOf(11L), getLong(row, 0));
        assertEquals(Long.valueOf(1L), getLong(row, 1));
View Full Code Here

        Cursor cursor = cursor(groupScan, queryContext, queryBindings);
        cursor.openTopLevel();
        Row row = cursor.next();
        assertSame(customerRowType, row.rowType());
        row = cursor.next();
        assertSame(orderRowType, row.rowType());
        // Get and checking each field should work
        assertEquals(Long.valueOf(11L), getLong(row, 0));
        assertEquals(Long.valueOf(1L), getLong(row, 1));
        assertEquals("ori", row.value(2).getString());
        // Getting all value sources and then using them should also work
View Full Code Here

            Operator plan = indexScan_Default(pSpatialIndexRowType, box, lookaheadQuantum());
            Cursor cursor = API.cursor(plan, queryContext, queryBindings);
            cursor.openTopLevel();
            Row row;
            while ((row = cursor.next()) != null) {
                assertSame(pSpatialIndexRowType.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

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.