findepi commented on issue #17401: URL: https://github.com/apache/datafusion/issues/17401#issuecomment-3252697480
Some code pieces with seemingly exponential complexity - https://github.com/apache/datafusion/blob/a5c242c21443e4881e6843f754493ab02238b655/datafusion/physical-plan/src/windows/mod.rs#L375-L376 - for each of N input expressions, `sort_options_resolving_constant` returns pair of values (N pairs) then `multi_cartesian_product` calculates cartesian product of these pairs, 2^N combinations - https://github.com/apache/datafusion/blob/a5c242c21443e4881e6843f754493ab02238b655/datafusion/physical-plan/src/windows/mod.rs#L469-L470 - looks same as above However, every usage of `multi_cartesian_product` looks suspicious. For example, this one looks also dangerous, just not related to window functions https://github.com/apache/datafusion/blob/9e062dfb41efbf817e6f0be5bb4e238f8c9ec93c/datafusion/expr-common/src/signature.rs#L551 -- 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]
