File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed
pipelines/processors/transforms/hash_join Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -840,24 +840,19 @@ impl HashJoinBuildState {
840840 }
841841
842842 pub fn add_runtime_filter_ready ( & self ) {
843- if self . ctx . get_cluster ( ) . is_empty ( ) {
844- return ;
845- }
846-
847- let mut wait_runtime_filter_table_indexes = HashSet :: new ( ) ;
843+ let mut scan_ids = HashSet :: new ( ) ;
848844 for rf in self . runtime_filter_desc ( ) {
849- // Collect scan_id from all probe targets (since one filter can be pushed to multiple scans)
850845 for ( _probe_key, scan_id) in & rf. probe_targets {
851- wait_runtime_filter_table_indexes . insert ( * scan_id) ;
846+ scan_ids . insert ( * scan_id) ;
852847 }
853848 }
854849
855850 let build_state = unsafe { & mut * self . hash_join_state . build_state . get ( ) } ;
856851 let runtime_filter_ready = & mut build_state. runtime_filter_ready ;
857- for table_index in wait_runtime_filter_table_indexes . into_iter ( ) {
852+ for scan_id in scan_ids . into_iter ( ) {
858853 let ready = Arc :: new ( RuntimeFilterReady :: default ( ) ) ;
859854 runtime_filter_ready. push ( ready. clone ( ) ) ;
860- self . ctx . set_runtime_filter_ready ( table_index , ready) ;
855+ self . ctx . set_runtime_filter_ready ( scan_id , ready) ;
861856 }
862857 }
863858
Original file line number Diff line number Diff line change @@ -1548,9 +1548,9 @@ impl TableContext for QueryContext {
15481548 }
15491549 }
15501550
1551- fn get_runtime_filter_ready ( & self , table_index : usize ) -> Vec < Arc < RuntimeFilterReady > > {
1551+ fn get_runtime_filter_ready ( & self , scan_id : usize ) -> Vec < Arc < RuntimeFilterReady > > {
15521552 let runtime_filter_ready = self . shared . runtime_filter_ready . read ( ) ;
1553- match runtime_filter_ready. get ( & table_index ) {
1553+ match runtime_filter_ready. get ( & scan_id ) {
15541554 Some ( v) => v. to_vec ( ) ,
15551555 None => vec ! [ ] ,
15561556 }
You can’t perform that action at this time.
0 commit comments