kumarUjjawal commented on code in PR #24781:
URL: https://github.com/apache/datafusion/pull/24781#discussion_r3921339965
##########
datafusion/pruning/src/string_in_list.rs:
##########
@@ -151,19 +184,46 @@ impl PhysicalExpr for StringInListPruningExpr {
// uses actual Arrow partition values.
PrunableStatistics
// trusts file providers' bounds: there is no ordering
gate
// for arbitrary statistics providers here.
- let index = self.values.partition_point(|v|
v.as_bytes() < min);
- Some(self.values.get(index).is_some_and(|v|
v.as_bytes() <= max))
+ match self.membership {
+ SetMembership::In => {
+ let index =
+ self.values.partition_point(|v|
v.as_bytes() < min);
+ Some(
+ self.values
+ .get(index)
+ .is_some_and(|v| v.as_bytes() <= max),
+ )
+ }
+ // A wider interval can always hold a value
outside the
+ // domain, which satisfies NOT IN. Only an interval
+ // pinned to one domain value rules out every row.
+ // Truncated Parquet bounds cannot fake that: min
+ // truncates downward and max upward, so equal
bounds
Review Comment:
done!
--
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]