2010YOUY01 commented on issue #23031: URL: https://github.com/apache/datafusion/issues/23031#issuecomment-4748759775
I can confirm `concat_batches` is not memory-efficient -- it holds the input batches in memory while building the large output batch, the consequence would be 2X memory usage comparing with all input batches memory size. Ideally we can make `concat_batches` more memory efficient, by building a in-progress builder for output, and append input batches to it one by one. After one input batch is finished, eagerly drop it. Because the concatenated array inside HJ is both simpler and faster, so I prefer to keep this design, and we could improve `concat_batches` instead. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
