Dandandan commented on issue #15607: URL: https://github.com/apache/datafusion/issues/15607#issuecomment-2857839305
My idea for the scope of this issue wasn't to support arbitrary expressions in the window frames / implement`Segment Tree`, but rather vectorize the existing implementation - i.e. * limit allocations (e.g. `ScalarValue`) in inner loops (i.e. the mentioned `calculate_range`) * try doing calculations on a batch level instead of per-value I think for the constant value the non-segment tree algorithm probably is the best choice anyway (and we should keep it), looking at this table (even when same complexity updating the segment tree will probably be slower than the existing algorithm): <img width="717" alt="Image" src="https://github.com/user-attachments/assets/b41dd9cb-9662-4230-899f-793f8e89a77d" /> -- 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]
