jonathanc-n commented on code in PR #16434: URL: https://github.com/apache/datafusion/pull/16434#discussion_r2157056171
########## datafusion/physical-plan/src/joins/stream_join_utils.rs: ########## @@ -47,26 +51,45 @@ use hashbrown::HashTable; /// Implementation of `JoinHashMapType` for `PruningJoinHashMap`. impl JoinHashMapType for PruningJoinHashMap { - type NextType = VecDeque<u64>; - // Extend with zero fn extend_zero(&mut self, len: usize) { self.next.resize(self.next.len() + len, 0) } - /// Get mutable references to the hash map and the next. - fn get_mut(&mut self) -> (&mut HashTable<(u64, u64)>, &mut Self::NextType) { - (&mut self.map, &mut self.next) + fn update_from_iter<'a>( + &mut self, + iter: Box<dyn Iterator<Item = (usize, &'a u64)> + Send + 'a>, + deleted_offset: usize, + ) { + let slice: &mut [u64] = self.next.make_contiguous(); + update_from_iter::<u64>(&mut self.map, slice, iter, deleted_offset); } - /// Get a reference to the hash map. - fn get_map(&self) -> &HashTable<(u64, u64)> { - &self.map + fn get_matched_indices<'a>( + &self, + iter: Box<dyn Iterator<Item = (usize, &'a u64)> + 'a>, + deleted_offset: Option<usize>, + ) -> (Vec<u32>, Vec<u64>) { + // Flatten the deque + let next: Vec<u64> = self.next.iter().copied().collect(); + get_matched_indices::<u64>(&self.map, &next, iter, deleted_offset) Review Comment: This seems to be alittle bit difficult to do without changing function parameters -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org