This is an automated email from the ASF dual-hosted git repository.
yjshen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new c08c30f940 Minor: fix clippy for memory_limit test (#7248)
c08c30f940 is described below
commit c08c30f940ad89f153c6753921dc59a77a3b1e14
Author: Yijie Shen <[email protected]>
AuthorDate: Wed Aug 9 10:47:03 2023 -0700
Minor: fix clippy for memory_limit test (#7248)
---
datafusion/core/tests/memory_limit.rs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/datafusion/core/tests/memory_limit.rs
b/datafusion/core/tests/memory_limit.rs
index 80bbbed8f0..862f5a8f97 100644
--- a/datafusion/core/tests/memory_limit.rs
+++ b/datafusion/core/tests/memory_limit.rs
@@ -24,7 +24,6 @@ use arrow_schema::SortOptions;
use async_trait::async_trait;
use datafusion::assert_batches_eq;
use datafusion::physical_optimizer::PhysicalOptimizerRule;
-use datafusion::physical_plan::common::batch_byte_size;
use datafusion::physical_plan::memory::MemoryExec;
use datafusion::physical_plan::streaming::PartitionStream;
use datafusion_expr::{Expr, TableType};
@@ -603,7 +602,7 @@ fn make_dict_batches() -> Vec<RecordBatch> {
let batches: Vec<_> = gen.take(num_batches).collect();
batches.iter().enumerate().for_each(|(i, batch)| {
- println!("Dict batch[{i}] size is: {}", batch_byte_size(batch));
+ println!("Dict batch[{i}] size is: {}", batch.get_array_memory_size());
});
batches
@@ -611,7 +610,7 @@ fn make_dict_batches() -> Vec<RecordBatch> {
// How many bytes does the memory from dict_batches consume?
fn batches_byte_size(batches: &[RecordBatch]) -> usize {
- batches.iter().map(batch_byte_size).sum()
+ batches.iter().map(|b| b.get_array_memory_size()).sum()
}
struct DummyStreamPartition {