wiedld commented on code in PR #7912:
URL: https://github.com/apache/arrow-datafusion/pull/7912#discussion_r1369472785


##########
datafusion/physical-plan/src/sorts/stream.rs:
##########
@@ -127,7 +127,7 @@ impl RowCursorStream {
         // track the memory in the newly created Rows.
         let mut rows_reservation = self.reservation.new_empty();
         rows_reservation.try_grow(rows.size())?;
-        Ok(RowValues::new(rows, rows_reservation))
+        Ok(RowValues::new(Arc::new(rows)))

Review Comment:
   The memory reservation is still grown on the line above.
   Since the `RowValues` take Arc::rows, it's not tied to the memory 
reservation. (Meaning, on the RowValue slicing is not adding to the 
reservation.)



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to