Package com.foundationdb.qp.row

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


                lookupCursor.open();
                Row retrievedRow = lookupCursor.next();
                if (retrievedRow != null) {
                    // Retrieved row might not actually be what we were looking for -- not all ancestors are present,
                    // (there are orphan rows).
                    retrievedRow = hKey.equals(retrievedRow.hKey()) ? retrievedRow : null;
                }
                return retrievedRow;
            } finally {
                lookupCursor.close();
            }
View Full Code Here


                            inputState.queryBindings = nextBindings;
                            for (int i = 0; i < ncursors; i++) {
                                if (i == keepInputCursorIndex) continue;
                                boolean deep = false;
                                if (i == branchCursorIndex) {
                                    row.hKey().copyTo(inputState.lookupHKeys[i]);
                                    if (branchRootOrdinal != -1) {
                                        inputState.lookupHKeys[i].extendWithOrdinal(branchRootOrdinal);
                                    }
                                    deep = true;
                                }
View Full Code Here

                    if (leftRow == null && rightRow == null) {
                        setIdle();
                    }
                    if (nextRow == null) {
                        setIdle();
                    } else if (previousHKey == null || !previousHKey.prefixOf(nextRow.hKey())) {
                        HKey nextHKey = outputHKey(nextRow);
                        nextRow = (Row) nextHKey;
                        previousHKey = nextHKey;
                    } else {
                        nextRow = null;
View Full Code Here

        private void nextLeftRow()
        {
            Row row;
            do {
                row = leftInput.next();
            } while (row != null && previousHKey != null && previousHKey.prefixOf(row.hKey()));
            leftRow = row;
        }
       
        private void nextRightRow()
        {
View Full Code Here

        private void nextRightRow()
        {
            Row row;
            do {
                row = rightInput.next();
            } while (row != null && previousHKey != null && previousHKey.prefixOf(row.hKey()));
            rightRow = row;
        }
       
        private long compareRows()
        {
View Full Code Here

                long z = getLong(row, 0);
                Integer expectedId = zToId.get(z);
                assertNotNull(expectedId);
                int id = getLong(row, 1).intValue();
                assertEquals(expectedId.intValue(), id);
                assertEquals(expectedHKey(id), row.hKey().toString());
                actual.add(id);
            }
            // There should be no false negatives
            assertTrue(actual.containsAll(expected));
        }
View Full Code Here

                long z = getLong(row, 0);
                Integer expectedId = zToId.get(z);
                assertNotNull(expectedId);
                int id = getLong(row, 1).intValue();
                assertEquals(expectedId.intValue(), id);
                assertEquals(expectedHKey(id), row.hKey().toString());
                actual.add(id);
            }
            // There should be no false negatives
            assertTrue(actual.containsAll(expected));
        }
View Full Code Here

                    Integer expectedId = zToId.get(z);
                    assertNotNull(expectedId);
                    int rowId = getLong(row, 2).intValue();
                    assertEquals(before, rowBefore);
                    assertEquals(expectedId.intValue(), rowId);
                    assertEquals(expectedHKey(rowId), row.hKey().toString());
                    actual.add(rowId);
                }
                // There should be no false negatives
                assertTrue(actual.containsAll(expected));
            }
View Full Code Here

                long zExpected = Spatial.shuffle(space, lat.doubleValue(), lon.doubleValue());
                assertEquals(zExpected, zActual);
                Integer expectedId = zToId.get(zActual);
                assertNotNull(expectedId);
                assertEquals(expectedId.intValue(), id);
                assertEquals(expectedHKey(id), row.hKey().toString());
                long distance = abs(zExpected - zStart);
                assertTrue(distance >= previousDistance);
                previousDistance = distance;
                count++;
            }
View Full Code Here

                    long zExpected = Spatial.shuffle(space, lat.doubleValue(), lon.doubleValue());
                    assertEquals(zExpected, zActual);
                    Integer expectedId = zToId.get(zActual);
                    assertNotNull(expectedId);
                    assertEquals(expectedId.intValue(), id);
                    assertEquals(expectedHKey(id), row.hKey().toString());
                    long distance = abs(zExpected - zStart);
                    assertTrue(distance >= previousDistance);
                    previousDistance = distance;
                    actualIdByDistance.add(id);
                }
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.