jonahgao commented on code in PR #11929:
URL: https://github.com/apache/datafusion/pull/11929#discussion_r1713127966


##########
datafusion/sqllogictest/src/engines/datafusion_engine/runner.rs:
##########
@@ -69,9 +71,11 @@ impl sqllogictest::AsyncDB for DataFusion {
 
 async fn run_query(ctx: &SessionContext, sql: impl Into<String>) -> 
Result<DFOutput> {
     let df = ctx.sql(sql.into().as_str()).await?;
+    let task_ctx = Arc::new(df.task_ctx());
+    let plan = df.create_physical_plan().await?;
 
-    let types = normalize::convert_schema_to_types(df.schema().fields());
-    let results: Vec<RecordBatch> = df.collect().await?;
+    let types = normalize::convert_schema_to_types(plan.schema().fields());
+    let results: Vec<RecordBatch> = collect(plan, task_ctx).await?;

Review Comment:
   It would be better to keep them the same.  Changed to using 
`SendableRecordBatchStream`. Thanks @alamb 



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to