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

Method run

datafusion/expr/src/expr_rewriter/order_by.rs:492–510  ·  view source on GitHub ↗

calls rewrite_sort_cols_by_aggs for expr and compares it to expected_expr

(self, input_plan: &LogicalPlan)

Source from the content-addressed store, hash-verified

490 impl TestCase {
491 /// calls rewrite_sort_cols_by_aggs for expr and compares it to expected_expr
492 fn run(self, input_plan: &LogicalPlan) {
493 let Self {
494 desc,
495 input,
496 expected,
497 } = self;
498
499 println!("running: '{desc}'");
500 let mut exprs =
501 rewrite_sort_cols_by_aggs(vec![input.clone()], input_plan).unwrap();
502
503 assert_eq!(exprs.len(), 1);
504 let rewritten = exprs.pop().unwrap();
505
506 assert_eq!(
507 rewritten, expected,
508 "\n\ninput:{input:?}\nrewritten:{rewritten:?}\nexpected:{expected:?}\n"
509 );
510 }
511 }
512
513 /// Scan of a table: t(c1 int, c2 varchar, c3 float)

Calls 2

popMethod · 0.45