()
| 556 | |
| 557 | #[test] |
| 558 | fn generate_different_schema() { |
| 559 | let opt = Optimizer::with_rules(vec![Arc::new(GetTableScanRule {})]); |
| 560 | let config = OptimizerContext::new().with_skip_failing_rules(false); |
| 561 | let plan = LogicalPlan::EmptyRelation(EmptyRelation { |
| 562 | produce_one_row: false, |
| 563 | schema: Arc::new(DFSchema::empty()), |
| 564 | }); |
| 565 | let err = opt.optimize(plan, &config, &observe).unwrap_err(); |
| 566 | |
| 567 | // Simplify assert to check the error message contains the expected message |
| 568 | assert_contains!( |
| 569 | err.strip_backtrace(), |
| 570 | "Failed due to a difference in schemas: original schema: DFSchema" |
| 571 | ); |
| 572 | } |
| 573 | |
| 574 | #[test] |
| 575 | fn skip_generate_different_schema() { |
nothing calls this directly
no test coverage detected
searching dependent graphs…