fbocse commented on a change in pull request #86: Fix row group dictionary
filter handling of null values.
URL: https://github.com/apache/incubator-iceberg/pull/86#discussion_r253802993
##########
File path:
parquet/src/main/java/com/netflix/iceberg/parquet/ParquetDictionaryRowGroupFilter.java
##########
@@ -282,7 +285,7 @@ public Boolean or(Boolean leftResult, Boolean rightResult)
{
}
Set<T> dictionary = dict(id, lit.comparator());
- if (dictionary.size() > 1) {
+ if (dictionary.size() > 1 || mayContainNulls.get(id)) {
Review comment:
Nitpick - seeing that `EvalVisitor#dict` may return `null` you might
consider returning a `java.util.Collections.emptySet()` instead
[here](https://github.com/apache/incubator-iceberg/blob/master/parquet/src/main/java/com/netflix/iceberg/parquet/ParquetDictionaryRowGroupFilter.java#L313)?
It could save the trouble of having to NPE check on `dictionary` in all the
methods where we have its size evaluated
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]