Skip to content

Commit

Permalink
Fix NULL bug in parquet and add cutoff
Browse files Browse the repository at this point in the history
  • Loading branch information
AlSchlo committed May 1, 2024
1 parent 0f9573f commit 684df07
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions optd-datafusion-repr/src/cost/base_cost/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,14 @@ impl<
// this logic just so happens to be the exact same logic as get_column_equality_selectivity implements
let ret_freq = Self::get_column_leq_value_freq(column_stats, value)
- self.get_column_equality_selectivity(table, col_idx, value, true);
let ret_freq = if ret_freq < 0.0 { // TODO(Alexis): temporary fix.
0.0
} else if ret_freq > 1.0 {
1.0
} else {
ret_freq
};

assert!(
(0.0..=1.0).contains(&ret_freq),
"ret_freq ({}) should be in [0, 1]",
Expand Down

0 comments on commit 684df07

Please sign in to comment.