Skip to content

Commit 0258c36

Browse files
committed
modify the spilling judgement.
1 parent 0f5ab15 commit 0258c36

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

datafusion/physical-plan/src/aggregates/row_hash.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ use arrow::datatypes::SchemaRef;
4141
use datafusion_common::{internal_err, DataFusionError, Result};
4242
use datafusion_execution::disk_manager::RefCountedTempFile;
4343
use datafusion_execution::memory_pool::proxy::VecAllocExt;
44-
use datafusion_execution::memory_pool::{MemoryConsumer, MemoryReservation};
44+
use datafusion_execution::memory_pool::{MemoryConsumer, MemoryLimit, MemoryReservation};
4545
use datafusion_execution::TaskContext;
4646
use datafusion_expr::{EmitTo, GroupsAccumulator};
4747
use datafusion_physical_expr::expressions::Column;
@@ -683,7 +683,7 @@ fn maybe_enable_blocked_groups(
683683
.enable_aggregation_blocked_groups
684684
|| !matches!(group_ordering, GroupOrdering::None)
685685
|| accumulators.is_empty()
686-
|| context.runtime_env().disk_manager.tmp_files_enabled()
686+
|| matches!(context.memory_pool().memory_limit(), MemoryLimit::Infinite)
687687
{
688688
return Ok(false);
689689
}

0 commit comments

Comments
 (0)