MCPcopy Create free account
hub / github.com/apache/datafusion / run

Method run

datafusion/sql/tests/cases/params.rs:36–54  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

34
35impl 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
57pub struct ParameterTestWithMetadata<'a> {

Callers

nothing calls this directly

Calls 10

get_parameter_typesMethod · 0.80
collectMethod · 0.80
get_parameter_fieldsMethod · 0.80
logical_planFunction · 0.50
ListClass · 0.50
mapMethod · 0.45
iterMethod · 0.45
to_stringMethod · 0.45
cloneMethod · 0.45
with_param_valuesMethod · 0.45

Tested by

no test coverage detected