Dandandan commented on code in PR #16153: URL: https://github.com/apache/datafusion/pull/16153#discussion_r2105354304
########## datafusion/physical-plan/src/joins/join_hash_map.rs: ########## @@ -261,13 +264,32 @@ pub trait JoinHashMapType { limit: usize, offset: JoinHashMapOffset, ) -> (Vec<u32>, Vec<u64>, Option<JoinHashMapOffset>) { - let mut input_indices = vec![]; - let mut match_indices = vec![]; - - let mut remaining_output = limit; + let mut input_indices = Vec::with_capacity(limit); + let mut match_indices = Vec::with_capacity(limit); Review Comment: Yeah sure - that's an interesting one (probably it can, but probably would need to get the buffer back from `PrimitiveArray` after passing it to `take`, i.e. via `get_mut`) -- 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