alamb commented on PR #14644:
URL: https://github.com/apache/datafusion/pull/14644#issuecomment-2665613858

   > > This PR can't solve
   > > select * from t consumes 2GB memory to fully materialize the output, in 
the best case select * from t order by c1 consumes around 2GB memory, given 
sorting is an O(1) space operation. The current situation is it consumes 4GB+ 
(more than 2 times).
   > 
   > I think this is by design. The physical operators should not reserve 
memory for the batches it produces. It is the parent operator's duty to reserve 
memory for the batches fetched from children operators if it needs to hold the 
batches in memory for a long time.
   
   This is a great observation and I think holds true in practice
   
   However I don't think it is reflected in the documention here
   
https://docs.rs/datafusion/latest/datafusion/execution/memory_pool/trait.MemoryPool.html
   
   
   Would someone be willing to update those docs?
   
   
   


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