You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Using the AND operator to combine the dynamic filters with the static predicate means that
123
+
// a row (or a row group) must satisfy both conditions before it's read from disk.
124
+
// The approach assumes that the static predicate and dynamic filters are independent and complementary.
125
+
// In other words, the dynamic filters are not meant to replace or override the original predicate; they refine the set of rows even further.
126
+
// If they were combined using OR, you might end up with more rows than necessary, which would negate the benefits of dynamic filtering.
127
+
// Since the dynamic filters are calculated at runtime, they might sometimes be conservative estimates.
128
+
// By combining them with AND, the system errs on the side of safety—only excluding data when it’s reasonably certain that the rows won’t match the overall query conditions.
129
+
let dynamic_predicate = if dynamic_filters.is_empty(){
130
+
None
131
+
}else{
132
+
Some(conjunction(dynamic_filters))
133
+
};
125
134
let enable_page_index = should_enable_page_index(
126
135
self.enable_page_index,
127
136
&self.page_pruning_predicate,
@@ -131,11 +140,7 @@ impl FileOpener for ParquetOpener {
131
140
let predicate = match(predicate, dynamic_predicate){
0 commit comments