Source:
<code>public void scan() throws IOException { if (!rowGroupOpen) { openRowGroup(); } beginScan(presentStream, null); QualifyingSet input = inputQualifyingSet; QualifyingSet output = outputQualifyingSet; int end = input.getEnd(); int rowsInRange = end - posInRowGroup; int valuesSize = end; int[] inputPositions = input.getPositions(); if (filter != null) { output.reset(rowsInRange); } if (values == null || values.length < valuesSize) { values = new byte[valuesSize]; } if (dataStream == null) { processAllNulls(); endScan(presentStream); return; } int nextActive = inputPositions[0]; int activeIdx = 0; int toSkip = 0; for (int i = 0; i < rowsInRange; i++) { if (i + posInRowGroup == nextActive) { <START> if (nextActive == truncationRow) { <END> break; } if (presentStream != null && !present[i]) { if (filter == null || filter.testNull()) { if (filter != null) { output.append(i + posInRowGroup, activeIdx); } addNullResult(); } } else { if (toSkip > 0) { dataStream.skip(toSkip); } byte value = dataStream.next(); if (filter != null) { if (filter.testLong(value)) { output.append(i + posInRowGroup, activeIdx); addResult(value); } } else { addResult(value); } } if (++activeIdx == input.getPositionCount()) { toSkip = countPresent(i + 1, end - posInRowGroup); break; } nextActive = inputPositions[activeIdx]; if (outputChannel != -1 && numResults > resultSizeBudget) { truncationRow = inputQualifyingSet.truncateAndReturnTruncationRow(activeIdx); } continue; } else { if (presentStream == null || present[i]) { toSkip++; } } } if (toSkip > 0) { dataStream.skip(toSkip); } endScan(presentStream); }</code><technical_language>clear presentStream is null not. represented Optional</technical_language>

Target:
public void scan() throws IOException { if (!rowGroupOpen) { openRowGroup(); } beginScan(presentStream, null); QualifyingSet input = inputQualifyingSet; QualifyingSet output = outputQualifyingSet; int end = input.getEnd(); int rowsInRange = end - posInRowGroup; int[] inputPositions = input.getPositions(); if (filter != null) { output.reset(rowsInRange); } ensureValuesCapacity(end, false); if (dataStream == null) { processAllNulls(); endScan(presentStream); return; } int nextActive = inputPositions[0]; int activeIdx = 0; int toSkip = 0; for (int i = 0; i < rowsInRange; i++) { if (i + posInRowGroup == nextActive) { if (nextActive == truncationRow) { break; } if (presentStream != null && !present[i]) { if (filter == null || filter.testNull()) { if (filter != null) { output.append(i + posInRowGroup, activeIdx); } addNullResult(); } } else { if (toSkip > 0) { dataStream.skip(toSkip); } byte value = dataStream.next(); if (filter != null) { if (filter.testLong(value)) { output.append(i + posInRowGroup, activeIdx); addResult(value); } } else { addResult(value); } } if (++activeIdx == input.getPositionCount()) { toSkip = countPresent(i + 1, end - posInRowGroup); break; } nextActive = inputPositions[activeIdx]; if (outputChannelSet && numResults > resultSizeBudget) { truncationRow = inputQualifyingSet.truncateAndReturnTruncationRow(activeIdx); } continue; } else { if (presentStream == null || present[i]) { toSkip++; } } } if (toSkip > 0) { dataStream.skip(toSkip); } endScan(presentStream); }