jonathanc-n commented on code in PR #17429:
URL: https://github.com/apache/datafusion/pull/17429#discussion_r2323986334


##########
datafusion/physical-plan/src/joins/sort_merge_join/stream.rs:
##########
@@ -849,11 +854,13 @@ impl SortMergeJoinStream {
 
     fn free_reservation(&mut self, buffered_batch: BufferedBatch) -> 
Result<()> {
         // Shrink memory usage for in-memory batches only
-        if buffered_batch.spill_file.is_none() && 
buffered_batch.batch.is_some() {
-            self.reservation
-                .try_shrink(buffered_batch.size_estimation)?;
+        match buffered_batch.batch {

Review Comment:
   This is done like so to avoid having to add `PartialEq` for 
`RefCountedTempFile`



-- 
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

Reply via email to