Skip to content

Commit 14b15e5

Browse files
committed
2 parents c1db3be + 8795b4b commit 14b15e5

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

src/Parquet.Test/ParquetReaderTest.cs

+11
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,17 @@ public async Task Reads_multi_page_file() {
8282
}
8383
}
8484

85+
[Fact]
86+
public async Task Reads_rle_dictionary_encoded_columns() {
87+
using(ParquetReader reader = await ParquetReader.CreateAsync(OpenTestFile("rle_dictionary_encoded_columns.parquet"), leaveStreamOpen: false)) {
88+
DataColumn[] data = await reader.ReadEntireRowGroupAsync();
89+
90+
//If we made it this far we were able to read all the columns
91+
Assert.Single(data[0].Data);
92+
Assert.Equal(40539, ((float?[])data[0].Data)[0]);
93+
}
94+
}
95+
8596
[Fact]
8697
public async Task Reads_byte_arrays() {
8798
byte[] nameValue;
Binary file not shown.

src/Parquet/File/DataColumnReader.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ private void ReadColumn(BinaryReader reader, Thrift.Encoding encoding, long tota
240240
break;
241241

242242
case Thrift.Encoding.PLAIN_DICTIONARY:
243+
case Thrift.Encoding.RLE_DICTIONARY:
243244
if(cd.indexes == null)
244245
cd.indexes = new int[(int)totalValues];
245246
indexCount = ReadPlainDictionary(reader, maxReadCount, cd.indexes, 0);
@@ -277,4 +278,4 @@ private static int GetRemainingLength(BinaryReader reader) {
277278
return (int)(reader.BaseStream.Length - reader.BaseStream.Position);
278279
}
279280
}
280-
}
281+
}

0 commit comments

Comments
 (0)