Skip to content

Commit 88f37d2

Browse files
ishepherdaloneguid
andauthored
Avoid EndOfStreamException (#95)
Co-authored-by: Ivan Gavryliuk <aloneguid@outlook.com>
1 parent 4432ce6 commit 88f37d2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Parquet/File/DataColumnReader.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,11 @@ private static int ReadPlainDictionary(BinaryReader reader, int maxReadCount, in
277277
}
278278
else
279279
{
280-
offset += RunLengthBitPackingHybridValuesReader.ReadRleBitpackedHybrid(reader, bitWidth, length, dest, offset, maxReadCount);
280+
int length = GetRemainingLength(reader);
281+
if (length != 0)
282+
{
283+
offset += RunLengthBitPackingHybridValuesReader.ReadRleBitpackedHybrid(reader, bitWidth, length, dest, offset, maxReadCount);
284+
}
281285
}
282286

283287
return offset - start;

0 commit comments

Comments
 (0)