clee704 commented on code in PR #3458:
URL: https://github.com/apache/parquet-java/pull/3458#discussion_r3107271696
##########
parquet-column/src/main/java/org/apache/parquet/internal/column/columnindex/ColumnIndexBuilder.java:
##########
@@ -750,6 +753,19 @@ private ColumnIndexBase<?> build(PrimitiveType type) {
if (!nullCounts.isEmpty()) {
columnIndex.nullCounts = nullCounts.toLongArray();
}
+ // A null_pages entry of true indicates the page consists entirely of null
values.
+ // When null_counts is present, a null_counts entry of zero means the page
has no
+ // null values at all. These two fields directly contradict each other: a
page
+ // cannot both consist entirely of nulls and contain zero nulls. Since
null_pages
+ // is the field that causes the reader to skip pages during column index
filtering,
+ // the safe response is to discard the column index for this column
entirely.
+ if (columnIndex.nullCounts != null) {
+ for (int i = 0; i < columnIndex.nullPages.length; i++) {
+ if (columnIndex.nullPages[i] && columnIndex.nullCounts[i] == 0L) {
Review Comment:
Thanks for the suggestion! Applied
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]