Source:
<code>public Block readBlock() throws IOException { if (!rowGroupOpen) { openRowGroup(); } if (readOffset > 0) { if (presentStream != null) { readOffset = presentStream.countBitsSet(readOffset); } if (readOffset > 0) { if (dataStream == null) { throw new OrcCorruptionException(streamDescriptor.getOrcDataSourceId(), "Value is not null but data stream is not present"); } if (inDictionaryStream != null) { inDictionaryStream.skip(readOffset); } dataStream.skip(readOffset); } } int[] idsVector = new int[nextBatchSize]; if (presentStream == null) { if (dataStream == null) { throw new OrcCorruptionException(streamDescriptor.getOrcDataSourceId(), "Value is not null but data stream is not present"); } if (inDictionaryStream == null) { dataStream.nextIntVector(nextBatchSize, idsVector, 0); } else { for (int i = 0; i < nextBatchSize; i++) { idsVector[i] = toIntExact(dataStream.next()); if (!inDictionaryStream.nextBit()) { idsVector[i] += stripeDictionarySize; } } } } else { if (dataStream == null) { <START> int notNullValues = presentStream.countBitsSet(nextBatchSize); <END> if (notNullValues != 0) { throw new OrcCorruptionException(streamDescriptor.getOrcDataSourceId(), "Value is not null but data stream is not present"); } } else { for (int i = 0; i < nextBatchSize; i++) { if (!presentStream.nextBit()) { idsVector[i] = dictionaryBlock.getPositionCount() - 1; } else { idsVector[i] = toIntExact(dataStream.next()); if (inDictionaryStream != null && !inDictionaryStream.nextBit()) { idsVector[i] += stripeDictionarySize; } } } } } Block block = new DictionaryBlock(nextBatchSize, dictionaryBlock, idsVector); readOffset = 0; nextBatchSize = 0; return block; }</code><technical_language>This change related</technical_language>

Target:
public Block readBlock() throws IOException { if (!rowGroupOpen) { openRowGroup(); } if (readOffset > 0) { if (presentStream != null) { readOffset = presentStream.countBitsSet(readOffset); } if (readOffset > 0) { if (dataStream == null) { throw new OrcCorruptionException(streamDescriptor.getOrcDataSourceId(), "Value is not null but data stream is not present"); } if (inDictionaryStream != null) { inDictionaryStream.skip(readOffset); } dataStream.skip(readOffset); } } int[] idsVector = new int[nextBatchSize]; if (presentStream == null) { if (dataStream == null) { throw new OrcCorruptionException(streamDescriptor.getOrcDataSourceId(), "Value is not null but data stream is not present"); } if (inDictionaryStream == null) { dataStream.next(idsVector, nextBatchSize); } else { for (int i = 0; i < nextBatchSize; i++) { idsVector[i] = toIntExact(dataStream.next()); if (!inDictionaryStream.nextBit()) { idsVector[i] += stripeDictionarySize; } } } } else { if (dataStream == null) { int nullValues = presentStream.getUnsetBits(nextBatchSize); if (nullValues != nextBatchSize) { throw new OrcCorruptionException(streamDescriptor.getOrcDataSourceId(), "Value is not null but data stream is not present"); } } else { for (int i = 0; i < nextBatchSize; i++) { if (!presentStream.nextBit()) { idsVector[i] = dictionaryBlock.getPositionCount() - 1; } else { idsVector[i] = toIntExact(dataStream.next()); if (inDictionaryStream != null && !inDictionaryStream.nextBit()) { idsVector[i] += stripeDictionarySize; } } } } } Block block = new DictionaryBlock(nextBatchSize, dictionaryBlock, idsVector); readOffset = 0; nextBatchSize = 0; return block; }