@Override public Cell getNextCellHint(Cell currentCell) throws IOException { if (isEmpty()) { return super.getNextCellHint(currentCell); } Cell minKeyHint = null; // If any condition can pass, we need to keep the min hint for (int i = 0, n = filters.size(); i < n; i++) { if (filters.get(i).filterAllRemaining()) { continue; } Cell curKeyHint = filters.get(i).getNextCellHint(currentCell); if (curKeyHint == null) { // If we ever don't have a hint and this is must-pass-one, then no hint return null; } // If this is the first hint we find, set it if (minKeyHint == null) { minKeyHint = curKeyHint; continue; } if (this.compareCell(minKeyHint, curKeyHint) > 0) { minKeyHint = curKeyHint; } } return minKeyHint; }
case SEEK_NEXT_USING_HINT: Cell nextHintCell = subFilter.getNextCellHint(prevCell); return nextHintCell != null && compareCell(currentCell, nextHintCell) < 0 ? ReturnCode.SEEK_NEXT_USING_HINT : null; case NEXT_COL:
@Override public Cell getNextCellHint(Cell currentCell) throws IOException { if (isEmpty()) { return super.getNextCellHint(currentCell); } Cell minKeyHint = null; // If any condition can pass, we need to keep the min hint for (int i = 0, n = filters.size(); i < n; i++) { if (filters.get(i).filterAllRemaining()) { continue; } Cell curKeyHint = filters.get(i).getNextCellHint(currentCell); if (curKeyHint == null) { // If we ever don't have a hint and this is must-pass-one, then no hint return null; } // If this is the first hint we find, set it if (minKeyHint == null) { minKeyHint = curKeyHint; continue; } if (this.compareCell(minKeyHint, curKeyHint) > 0) { minKeyHint = curKeyHint; } } return minKeyHint; } }
case SEEK_NEXT_USING_HINT: Cell nextHintCell = subFilter.getNextCellHint(prevCell); return nextHintCell != null && compareCell(currentCell, nextHintCell) < 0 ? ReturnCode.SEEK_NEXT_USING_HINT : null; case NEXT_COL:
@Override public Cell getNextCellHint(Cell currentCell) throws IOException { if (isEmpty()) { return super.getNextCellHint(currentCell); } Cell minKeyHint = null; // If any condition can pass, we need to keep the min hint for (int i = 0, n = filters.size(); i < n; i++) { if (filters.get(i).filterAllRemaining()) { continue; } Cell curKeyHint = filters.get(i).getNextCellHint(currentCell); if (curKeyHint == null) { // If we ever don't have a hint and this is must-pass-one, then no hint return null; } // If this is the first hint we find, set it if (minKeyHint == null) { minKeyHint = curKeyHint; continue; } if (this.compareCell(minKeyHint, curKeyHint) > 0) { minKeyHint = curKeyHint; } } return minKeyHint; } }
case SEEK_NEXT_USING_HINT: Cell nextHintCell = getNextCellHint(prevCell); return nextHintCell == null || this.compareCell(currentCell, nextHintCell) >= 0; case NEXT_COL: case INCLUDE_AND_NEXT_COL: