From 81d141d2e341775995626fe565d361532dd7a046 Mon Sep 17 00:00:00 2001 From: Matt Green Date: Thu, 15 Aug 2024 04:17:32 -0700 Subject: [PATCH] add aggregate to simple aggregation --- crates/core/src/datastream.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/crates/core/src/datastream.rs b/crates/core/src/datastream.rs index af877ea..7ec6b59 100644 --- a/crates/core/src/datastream.rs +++ b/crates/core/src/datastream.rs @@ -132,14 +132,11 @@ impl DataStream { loop { match stream.next().await.transpose() { Ok(Some(batch)) => { - for i in 0..batch.num_rows() { - let row = batch.slice(i, 1); - println!( - "{}", - datafusion::common::arrow::util::pretty::pretty_format_batches(&[row]) - .unwrap() - ); - } + println!( + "{}", + datafusion::common::arrow::util::pretty::pretty_format_batches(&[batch]) + .unwrap() + ); } Ok(None) => { log::warn!("No RecordBatch in stream");