DerGut opened a new issue, #15675: URL: https://github.com/apache/datafusion/issues/15675
### Describe the bug When running a sort with a low memory limit, DataFusion can run into an internal error. I noticed this with the `SHOW ALL;` command, which is converted to `SELECT name, value FROM information_schema.df_settings ORDER BY name` and hence runs a sort. ### To Reproduce ``` cargo run --bin=datafusion-cli -- -m=10m -c="show all" ``` Will error with ``` Error: Internal error: Should be called after `spill_append`. This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker ``` Note, that `-m=20m` will succeed again. ### Expected behavior I'd instead expect the sort to either work (if necessary with spilling) or to return a non-internal error that's actionable to the user. ### Additional context Tested this on [main](https://github.com/apache/datafusion/commit/5ab5a03724b3afa009ba480a022145875972d08c). I'd be happy to dig a little bit deeper into this over the weekend :) -- 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.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