Fix the size of all-null blocks returned from List reader
@@ -509,7 +509,7 @@ public class ListSelectiveStreamReader
checkState(!valuesInUse, "BlockLease hasn't been closed yet");
if (allNulls) {
- return new RunLengthEncodedBlock(outputType.createBlockBuilder(null, 1).appendNull().build(), outputPositionCount);
+ return new RunLengthEncodedBlock(outputType.createBlockBuilder(null, 1).appendNull().build(), positionCount);
}
boolean mayHaveNulls = nullsAllowed && presentStream != null;
@@ -577,7 +577,7 @@ public class ListSelectiveStreamReader
checkState(!valuesInUse, "BlockLease hasn't been closed yet");
if (allNulls) {
- return newLease(new RunLengthEncodedBlock(outputType.createBlockBuilder(null, 1).appendNull().build(), outputPositionCount));
+ return newLease(new RunLengthEncodedBlock(outputType.createBlockBuilder(null, 1).appendNull().build(), positionCount));
}
boolean includeNulls = nullsAllowed && presentStream != null;
