DerGut commented on issue #15675:
URL: https://github.com/apache/datafusion/issues/15675#issuecomment-2798317659

   You are right! 
   
   With `v46.0.1`, the ExternalSorter estimates `35840 ` bytes for the first 
record batch. Running with `sort_spill_reservation_bytes + record batch size == 
memory limit`:
   ```
   DATAFUSION_EXECUTION_SORT_SPILL_RESERVATION_BYTES=512 cargo run --bin 
datafusion-cli -- --memory-limit=35840  --command="SHOW all;"
   ```
   the command succeeds while running with `--memory-limit=35839` 
(`sort_spill_reservation_bytes + record batch size > memory limit`) fails.
   
   ---
   
   Including more actionable context in the error message makes a lot of sense 
to me. I'll put up a PR to change this behavior. Thanks a lot for looking into 
it 🙇 


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