You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/10/13 10:43:09 UTC

[GitHub] [arrow] alamb commented on a change in pull request #8452: ARROW-10293: [Rust] [DataFusion] Fixed benchmarks

alamb commented on a change in pull request #8452:
URL: https://github.com/apache/arrow/pull/8452#discussion_r503831762



##########
File path: rust/datafusion/benches/aggregate_query_sql.rs
##########
@@ -38,13 +39,12 @@ use datafusion::datasource::MemTable;
 use datafusion::error::Result;
 use datafusion::execution::context::ExecutionContext;
 
-async fn query(ctx: Arc<Mutex<ExecutionContext>>, sql: &str) {
+fn query(ctx: Arc<Mutex<ExecutionContext>>, sql: &str) {
+    let mut rt = Runtime::new().unwrap();
+
     // execute the query
     let df = ctx.lock().unwrap().sql(&sql).unwrap();
-    let results = df.collect().await.unwrap();
-
-    // display the relation
-    for _batch in results {}
+    rt.block_on(df.collect()).unwrap();

Review comment:
       👍  this is the major change, right?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org