2010YOUY01 commented on issue #19846: URL: https://github.com/apache/datafusion/issues/19846#issuecomment-3758770974
+1 for option 2, here are the reasons: This does affect functional correctness. For example, if a batch is 10 MB before spilling, after spilling and reading it back it may become 12 MB. The external sorter's merge phase then reserves memory based on the original 10 MB estimate, while the actual memory usage exceeds the memory pool’s expectation. Since DataFusion’s memory pool already allows a certain margin of error between estimated and actual memory usage, I think Option 2 is a good idea. We can tolerate, for example, a 20% estimation error, but order-of-magnitude errors (e.g., 10×) should still be treated as bugs, warned about, and fixed. -- 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]
