This function computes the selectivity of an operation by computing the cardinality ratio of the given input/output intervals. If this can not be calculated for some reason, it returns `1.0` meaning fully selective (no filtering).
(initial_interval: &Interval, final_interval: &Interval)
| 1720 | /// calculated for some reason, it returns `1.0` meaning fully selective (no |
| 1721 | /// filtering). |
| 1722 | pub fn cardinality_ratio(initial_interval: &Interval, final_interval: &Interval) -> f64 { |
| 1723 | match (final_interval.cardinality(), initial_interval.cardinality()) { |
| 1724 | (Some(final_interval), Some(initial_interval)) => { |
| 1725 | (final_interval as f64) / (initial_interval as f64) |
| 1726 | } |
| 1727 | _ => 1.0, |
| 1728 | } |
| 1729 | } |
| 1730 | |
| 1731 | /// Cast scalar value to the given data type using an arrow kernel. |
| 1732 | fn cast_scalar_value( |
no test coverage detected
searching dependent graphs…