jackwener commented on code in PR #6614:
URL: https://github.com/apache/arrow-datafusion/pull/6614#discussion_r1224480438


##########
datafusion/core/tests/sql/mod.rs:
##########
@@ -971,13 +971,8 @@ async fn plan_and_collect(ctx: &SessionContext, sql: &str) 
-> Result<Vec<RecordB
 async fn execute_to_batches(ctx: &SessionContext, sql: &str) -> 
Vec<RecordBatch> {
     let df = ctx.sql(sql).await.unwrap();
 
-    // We are not really interested in the direct output of 
optimized_logical_plan
-    // since the physical plan construction already optimizes the given 
logical plan
-    // and we want to avoid double-optimization as a consequence. So we just 
construct
-    // it here to make sure that it doesn't fail at this step and get the 
optimized
-    // schema (to assert later that the logical and optimized schemas are the 
same).
-    let optimized = df.clone().into_optimized_plan().unwrap();
-    assert_eq!(df.logical_plan().schema(), optimized.schema());

Review Comment:
   we shouldn't check schema here.
   Because analyzer will change schema



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to