(&self)
| 34 | |
| 35 | impl ParameterTest<'_> { |
| 36 | pub fn run(&self) -> String { |
| 37 | let plan = logical_plan(self.sql).unwrap(); |
| 38 | |
| 39 | let actual_types = plan.get_parameter_types().unwrap(); |
| 40 | let expected_types: HashMap<String, Option<DataType>> = self |
| 41 | .expected_types |
| 42 | .iter() |
| 43 | .map(|(k, v)| ((*k).to_string(), v.clone())) |
| 44 | .collect(); |
| 45 | |
| 46 | assert_eq!(actual_types, expected_types); |
| 47 | |
| 48 | let plan_with_params = plan |
| 49 | .clone() |
| 50 | .with_param_values(self.param_values.clone()) |
| 51 | .unwrap(); |
| 52 | |
| 53 | format!("** Initial Plan:\n{plan}\n** Final Plan:\n{plan_with_params}") |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | pub struct ParameterTestWithMetadata<'a> { |
nothing calls this directly
no test coverage detected