(
&self,
column: &phys_expr::Column,
statistics_type: StatisticsType,
)
| 775 | } |
| 776 | |
| 777 | fn find_stat_column( |
| 778 | &self, |
| 779 | column: &phys_expr::Column, |
| 780 | statistics_type: StatisticsType, |
| 781 | ) -> Option<usize> { |
| 782 | match statistics_type { |
| 783 | StatisticsType::RowCount => { |
| 784 | // Use the first row count we find, if any |
| 785 | self.columns |
| 786 | .iter() |
| 787 | .enumerate() |
| 788 | .find(|(_i, (_c, t, _f))| t == &statistics_type) |
| 789 | .map(|(i, (_c, _t, _f))| i) |
| 790 | } |
| 791 | _ => self |
| 792 | .columns |
| 793 | .iter() |
| 794 | .enumerate() |
| 795 | .find(|(_i, (c, t, _f))| c == column && t == &statistics_type) |
| 796 | .map(|(i, (_c, _t, _f))| i), |
| 797 | } |
| 798 | } |
| 799 | |
| 800 | /// Rewrites column_expr so that all appearances of column |
| 801 | /// are replaced with a reference to either the min or max |
no test coverage detected