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

Method validate_expected_plan

benchmarks/src/sql_benchmark.rs:557–573  ·  view source on GitHub ↗
(&self, physical_plan: &impl Debug)

Source from the content-addressed store, hash-verified

555 }
556
557 fn validate_expected_plan(&self, physical_plan: &impl Debug) -> Result<()> {
558 if self.expect.is_empty() {
559 return Ok(());
560 }
561
562 let plan_string = format!("{physical_plan:#?}");
563
564 for exp_str in &self.expect {
565 if !plan_string.contains(exp_str) {
566 return Err(exec_datafusion_err!(
567 "The query physical plan does not contain the expected string '{exp_str}'. Physical plan: {plan_string}"
568 ));
569 }
570 }
571
572 Ok(())
573 }
574
575 async fn execute_sql_without_result_buffering(
576 &self,

Callers 2

runMethod · 0.80

Calls 2

is_emptyMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected