Skip to content

Commit 3f6336d

Browse files
committed
Update
1 parent 1a73690 commit 3f6336d

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

parquet-column/src/main/java/org/apache/parquet/internal/filter2/columnindex/ColumnIndexFilter.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ private RowRanges applyPredicate(
192192
return allRows();
193193
}
194194

195-
if (!isValidMetadata(ci, oi, columnPath)) {
195+
if (!isValidIndexSize(ci, oi, columnPath)) {
196196
return allRows();
197197
}
198198

@@ -234,10 +234,7 @@ public RowRanges visit(Not not) {
234234
* @param columnPath the column path for error reporting
235235
* @return true if metadata is valid and safe to use, false if corrupt and should be ignored
236236
*/
237-
private static boolean isValidMetadata(ColumnIndex columnIndex, OffsetIndex offsetIndex, ColumnPath columnPath) {
238-
if (columnIndex == null || offsetIndex == null) {
239-
return true;
240-
}
237+
private static boolean isValidIndexSize(ColumnIndex columnIndex, OffsetIndex offsetIndex, ColumnPath columnPath) {
241238

242239
int columnIndexSize = columnIndex.getMinValues().size();
243240
int offsetIndexSize = offsetIndex.getPageCount();

0 commit comments

Comments
 (0)