Examples of hKey()


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

            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);
            }
            // There should be no false negatives
            assertTrue(actual.containsAll(expected));
        }
View Full Code Here

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

            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);
            }
            // There should be no false negatives
            assertTrue(actual.containsAll(expected));
        }
View Full Code Here

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

                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);
                }
                // There should be no false negatives
                assertTrue(actual.containsAll(expected));
            }
View Full Code Here

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

                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());
                assertEquals(zExpected, zActual);
                assertEquals(expectedHKey(id), row.hKey().toString());
                long distance = abs(zExpected - zStart);
                assertTrue(distance >= previousDistance);
                previousDistance = distance;
                count++;
            }
View Full Code Here

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

                    int id = getLong(row, 2).intValue();
                    BigDecimal lat = lats.get(id);
                    BigDecimal lon = lons.get(id);
                    long zExpected = Spatial.shuffle(space, lat.doubleValue(), lon.doubleValue());
                    assertEquals(zExpected, zActual);
                    assertEquals(expectedHKey(id), row.hKey().toString());
                    long distance = abs(zExpected - zStart);
                    assertTrue(distance >= previousDistance);
                    previousDistance = distance;
                    actualIdByDistance.add(id);
                }
View Full Code Here

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

        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
        assertTrue(actual.containsAll(expected));
    }
View Full Code Here

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

                cursor.open();
            count = 0;
            List<Row> actualRows = new ArrayList<>(); // So that result is viewable in debugger
            Row actualRow;
            while ((actualRow = cursor.next()) != null) {
                assertEquals(expected[count], actualRow.hKey().toString());
                count++;
                actualRows.add(actualRow);
            }
        } finally {
            if (topLevel)
View Full Code Here

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

                assertEquals(beforeEQ, before);
                Integer expectedPid = parentZToPid.get(z);
                assertNotNull(expectedPid);
                assertEquals(expectedPid.intValue(), pid);
                assertTrue(cid >= expectedPid + 1 && cid <= expectedPid + CHILDREN_PER_PARENT);
                assertEquals(expectedHKey(pid, cid), row.hKey().toString());
                actual.add(cid);
            }
            // There should be no false negatives
            assertTrue(actual.containsAll(expectedCids));
        }
View Full Code Here

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

                assertEquals(beforeEQ, before);
                Integer expectedCid = childZToCid.get(z);
                assertNotNull(expectedCid);
                assertEquals(expectedCid.intValue(), cid);
                assertEquals(pid(expectedCid), pid);
                assertEquals(expectedHKey(pid, cid), row.hKey().toString());
                actual.add(cid);
            }
            // There should be no false negatives
            assertTrue(actual.containsAll(expectedCids));
        }
View Full Code Here

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

                    assertEquals(zExpected, z);
                    Integer expectedCid = childZToCid.get(z);
                    assertNotNull(expectedCid);
                    assertEquals(expectedCid.intValue(), cid);
                    assertEquals(pid(expectedCid), pid);
                    assertEquals(expectedHKey(pid, cid), row.hKey().toString());
                    long distance = abs(zExpected - zStart);
                    assertTrue(distance >= previousDistance);
                    previousDistance = distance;
                    actualIdByDistance.add(cid);
                }
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.