Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
2010YOUY01 committed Feb 22, 2025
1 parent cea8b2b commit 0e4c164
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions datafusion/core/tests/memory_limit/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ mod memory_limit_validation;
use arrow::array::{ArrayRef, DictionaryArray, Int32Array, RecordBatch, StringViewArray};
use arrow::compute::SortOptions;
use arrow::datatypes::{Int32Type, SchemaRef};
use arrow::util::pretty;
use arrow_schema::{DataType, Field, Schema};
use datafusion::assert_batches_eq;
use datafusion::datasource::memory::MemorySourceConfig;
Expand All @@ -46,7 +45,7 @@ use datafusion_execution::memory_pool::{
FairSpillPool, GreedyMemoryPool, MemoryPool, TrackConsumersPool,
};
use datafusion_execution::TaskContext;
use datafusion_expr::{col, Expr, TableType};
use datafusion_expr::{Expr, TableType};
use datafusion_physical_expr::{LexOrdering, PhysicalSortExpr};
use datafusion_physical_optimizer::join_selection::JoinSelection;
use datafusion_physical_optimizer::PhysicalOptimizerRule;
Expand Down Expand Up @@ -466,7 +465,7 @@ async fn test_stringview_external_sort() {
.await
.unwrap();

let results = df.collect().await.expect("Query execution failed");
let _ = df.collect().await.expect("Query execution failed");
}

/// Run the query with the specified memory limit,
Expand Down
4 changes: 2 additions & 2 deletions datafusion/physical-plan/src/sorts/sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ impl ExternalSorter {
new_columns.push(Arc::new(new_array));
arr_mutated = true;
} else {
new_columns.push(array.clone());
new_columns.push(Arc::clone(array));
}
}

Expand Down Expand Up @@ -1478,7 +1478,7 @@ mod tests {
// Processing 840 KB of data using 400 KB of memory requires at least 2 spills
// It will spill roughly 18000 rows and 800 KBytes.
// We leave a little wiggle room for the actual numbers.
assert!((2..=10).contains(&spill_count));
assert!((12..=18).contains(&spill_count));
assert!((15000..=20000).contains(&spilled_rows));
assert!((700000..=900000).contains(&spilled_bytes));

Expand Down

0 comments on commit 0e4c164

Please sign in to comment.