Support reading files with a boolean SBBF written by Parquet Java#23245
Draft
Miha-Cancula-Flarion wants to merge 1 commit into
Draft
Support reading files with a boolean SBBF written by Parquet Java#23245Miha-Cancula-Flarion wants to merge 1 commit into
Miha-Cancula-Flarion wants to merge 1 commit into
Conversation
EmilyMatt
reviewed
Jun 29, 2026
| // See https://github.com/apache/parquet-java/blob/52c0a5e8c5ff7680cc299ce5aad60acef3a9054d/parquet-column/src/main/java/org/apache/parquet/column/impl/ColumnValueCollector.java#L75 | ||
| // In order to correctly read such files with SBBF, we have to skip the check and return `true` | ||
| // because values may be present in the data file even if they are not in the filter. | ||
| ScalarValue::Boolean(Some(_)) => true, |
Contributor
There was a problem hiding this comment.
Please make this configurable
While I think this is worthwhile(especially for Spark/Hadoop parquets usecases), we definitely want to support boolean values here, probably even by default
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
When https://github.com/apache/parquet-java/ writes a bloom filter for a boolean column, it does not actually update the values, so the filter ends up empty. At https://github.com/apache/parquet-java/blob/52c0a5e8c5ff7680cc299ce5aad60acef3a9054d/parquet-column/src/main/java/org/apache/parquet/column/impl/ColumnValueCollector.java#L75 , all
write()functions callbloomFilter.insertHash, except thewrite(boolean)one.The DataFusion reader then incorrectly assumes that such a file contains no values, and skips it while reading.
What changes are included in this PR?
This change makes is so that we always assume that a boolean column has values, essentially ignoring the filter.
Are these changes tested?
Not yet.
Are there any user-facing changes?
This may affect performance in cases where the SBBF was written correctly, and thus legitimately excludes some data files. With this change, those files will still be scanned.
There are no changes to the API.