states[i] = new State(i, leaves[i], columns[i], nextLevel[i], groupConverterPaths[i], primitiveConverters[i]); for (int nextR = 0; nextR <= state.maxRepetitionLevel; ++ nextR) { int caseStartLevel = currentLevel; int caseDepth = Math.max(state.getDepth(d), caseStartLevel - 1); int caseNextLevel = Math.min(state.nextLevel[nextR], caseDepth + 1); Case currentCase = new Case(caseStartLevel, caseDepth, caseNextLevel, getNextReader(state.id, nextR), d == state.maxDefinitionLevel);
states[i] = new State(i, leaves[i], columnReaders[i], levelToClose[i], groupConverterPaths[i], leafConverters[i]); for (int nextR = 0; nextR <= state.maxRepetitionLevel; ++ nextR) { int caseStartLevel = currentLevel; int caseDepth = Math.max(state.getDepth(d), caseStartLevel - 1); int caseNextLevel = Math.min(state.nextLevel[nextR], caseDepth + 1); Case currentCase = new Case(caseStartLevel, caseDepth, caseNextLevel, getNextReader(state.id, nextR), d == state.maxDefinitionLevel);
/** * Skips forwards until the filter finds the first match. Returns false * if none found. */ private void skipToMatch() { while (recordsRead < recordCount && !recordFilter.isMatch()) { State currentState = getState(0); do { ColumnReader columnReader = currentState.column; // currentLevel = depth + 1 at this point // set the current value if (columnReader.getCurrentDefinitionLevel() >= currentState.maxDefinitionLevel) { columnReader.skip(); } columnReader.consume(); // Based on repetition level work out next state to go to int nextR = currentState.maxRepetitionLevel == 0 ? 0 : columnReader.getCurrentRepetitionLevel(); currentState = currentState.getNextState(nextR); } while (currentState != null); ++ recordsRead; } } }
final protected int getCaseId(int state, int currentLevel, int d, int nextR) { return caseLookup[state].getCase(currentLevel, d, nextR).getID(); }
final protected int getCaseId(int state, int currentLevel, int d, int nextR) { return caseLookup[state].getCase(currentLevel, d, nextR).getID(); }