Skip to content

Commit 974a22b

Browse files
Yash DattaYash Datta
authored andcommitted
PARQUET-136: In case of all nulls in a binary column, statistics object read from file metadata is empty, and should return true for all nulls check for the column
1 parent 23db4eb commit 974a22b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

parquet-hadoop/src/main/java/parquet/filter2/statisticslevel/StatisticsFilter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ private ColumnChunkMetaData getColumnChunk(ColumnPath columnPath) {
6767
}
6868

6969
// is this column chunk composed entirely of nulls?
70+
// in case of all nulls, the stats object read from file metadata is empty
7071
private boolean isAllNulls(ColumnChunkMetaData column) {
71-
return column.getStatistics().getNumNulls() == column.getValueCount();
72+
return (column.getStatistics().isEmpty()) || (column.getStatistics().getNumNulls() == column.getValueCount());
7273
}
7374

7475
// are there any nulls in this column chunk?

0 commit comments

Comments
 (0)