RussellSpitzer commented on code in PR #17633:
URL: https://github.com/apache/iceberg/pull/17633#discussion_r3778063323
##########
parquet/src/main/java/org/apache/iceberg/parquet/ParquetDictionaryRowGroupFilter.java:
##########
@@ -175,7 +175,7 @@ public <T> Boolean isNaN(BoundReference<T> ref) {
public <T> Boolean notNaN(BoundReference<T> ref) {
int id = ref.fieldId();
- if (mayContainNulls.get(id)) {
+ if (mayContainNulls.get(id) == null || mayContainNulls.get(id)) {
Review Comment:
I think we should match the pattern in the other checks and just relocate if
(mayContainNulls) to under the "hasNonDictPages"
The reason being the "isFallback.get(id) " would essentially be doing the
"is this column there" check for us.
```java
@Override
public <T> Boolean notNaN(BoundReference<T> ref) {
int id = ref.fieldId();
Boolean hasNonDictPage = isFallback.get(id);
if (hasNonDictPage == null || hasNonDictPage) {
return ROWS_MIGHT_MATCH;
}
if (mayContainNulls.get(id)) {
return ROWS_MIGHT_MATCH;
}
Set<T> dictionary = dict(id, comparatorForNaNPredicate(ref));
return dictionary.stream().allMatch(NaNUtil::isNaN) ? ROWS_CANNOT_MATCH :
ROWS_MIGHT_MATCH;
}
```
This is basically the same as all the others
```java
public <T> Boolean isNaN(BoundReference<T> ref) {
int id = ref.fieldId();
Boolean hasNonDictPage = isFallback.get(id);
if (hasNonDictPage == null || hasNonDictPage) {
return ROWS_MIGHT_MATCH;
}
Set<T> dictionary = dict(id, comparatorForNaNPredicate(ref));
return dictionary.stream().anyMatch(NaNUtil::isNaN) ? ROWS_MIGHT_MATCH :
ROWS_CANNOT_MATCH;
}
```
--
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]