@@ -72,17 +72,11 @@ use datafusion_physical_expr_common::physical_expr::fmt_sql;
7272use futures:: StreamExt ;
7373use log:: { debug, info} ;
7474use std:: sync:: atomic:: { AtomicBool , AtomicUsize , Ordering } ;
75- use tokio:: sync:: Semaphore ;
7675
7776/// Hard-coded seed to ensure hash values from the hash join differ from `RepartitionExec`, avoiding collisions.
7877const HASH_JOIN_SEED : RandomState =
7978 RandomState :: with_seeds ( 'J' as u64 , 'O' as u64 , 'I' as u64 , 'N' as u64 ) ;
8079
81- fn global_partition_semaphore ( ) -> & ' static Arc < Semaphore > {
82- static SEM : OnceLock < Arc < Semaphore > > = OnceLock :: new ( ) ;
83- SEM . get_or_init ( || Arc :: new ( Semaphore :: new ( 1 ) ) )
84- }
85-
8680pub struct GraceHashJoinExec {
8781 /// left (build) side which gets hashed
8882 pub left : Arc < dyn ExecutionPlan > ,
@@ -692,8 +686,6 @@ impl ExecutionPlan for GraceHashJoinExec {
692686 let join_metrics_clone = Arc :: clone ( & join_metrics) ;
693687 let context_for_partition = Arc :: clone ( & context) ;
694688 let spill_fut = OnceFut :: new ( async move {
695- let sem = Arc :: clone ( global_partition_semaphore ( ) ) ;
696- let _partition_permit = sem. acquire_owned ( ) . await . unwrap ( ) ;
697689 // Track memory used during the partitioning phase for this join
698690 let mut left_reservation =
699691 MemoryConsumer :: new ( format ! ( "GraceHashJoinPartitionLeft[{partition}]" ) )
0 commit comments