We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8b2b1e4 commit 928eb9aCopy full SHA for 928eb9a
1 file changed
datafusion/core/tests/sql/mod.rs
@@ -765,6 +765,11 @@ async fn execute_to_batches(ctx: &SessionContext, sql: &str) -> Vec<RecordBatch>
765
.unwrap();
766
let logical_schema = plan.schema();
767
768
+ // We are not really interested in the direct output of optimized_logical_plan
769
+ // since the physical plan construction already optimizes the given logical plan
770
+ // and we want to avoid double-optimization as a consequence. So we just construct
771
+ // it here to make sure that it doesn't fail at this step and get the optimized
772
+ // schema (to assert later that the logical and optimized schemas are the same).
773
let msg = format!("Optimizing logical plan for '{}': {:?}", sql, plan);
774
let optimized_logical_plan = ctx
775
.optimize(&plan)
0 commit comments