You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2025/01/17 12:24:46 UTC
[PR] Minor: Simplify Bloom Filter Check [datafusion]
alamb opened a new pull request, #14165:
URL: https://github.com/apache/datafusion/pull/14165
## Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
-->
Closes #.
## Rationale for this change
I ran into this code while doing something else. There is duplication in the set of types supported by Bloom filtering checks that must be kept in sync. It would be better to have a single list
## What changes are included in this PR?
Simplify the bloom filter check
## Are these changes tested?
By existing CI
## Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->
<!--
If there are any breaking changes to public APIs, please add the `api change` label.
-->
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Minor: Simplify Bloom Filter Check [datafusion]
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead merged PR #14165:
URL: https://github.com/apache/datafusion/pull/14165
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] Minor: Simplify Bloom Filter Check [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #14165:
URL: https://github.com/apache/datafusion/pull/14165#discussion_r1920119094
##########
datafusion/core/src/datasource/physical_plan/parquet/row_group_filter.rs:
##########
@@ -294,23 +294,9 @@ impl BloomFilterStatistics {
}
_ => true,
},
- // One more pattern matching since not all data types are supported
- // inside of a Dictionary
- ScalarValue::Dictionary(_, inner) => match inner.as_ref() {
- ScalarValue::Int32(_)
- | ScalarValue::Int64(_)
- | ScalarValue::UInt32(_)
- | ScalarValue::UInt64(_)
- | ScalarValue::Float32(_)
- | ScalarValue::Float64(_)
- | ScalarValue::Utf8(_)
- | ScalarValue::LargeUtf8(_)
- | ScalarValue::Binary(_)
- | ScalarValue::LargeBinary(_) => {
- BloomFilterStatistics::check_scalar(sbbf, inner, parquet_type)
- }
- _ => true,
- },
+ ScalarValue::Dictionary(_, inner) => {
+ BloomFilterStatistics::check_scalar(sbbf, inner, parquet_type)
Review Comment:
The recursive function call will immediately do the same check, so there is no reason to also check the type before making the call
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org