alamb opened a new issue, #16199: URL: https://github.com/apache/datafusion/issues/16199
### Is your feature request related to a problem or challenge? For unrelated reasons, I reduced the size of `Expr` from `272` to `112` bytes in this PR: - https://github.com/apache/datafusion/pull/14366 It turns out this change resulted in a a pretty significant (10-20% faster) improvement in planning time https://github.com/apache/datafusion/pull/14366#issuecomment-2909160571: ``` group alamb_make_expr_smaller main ----- ----------------------- ---- physical_plan_clickbench_all 1.00 285.4±4.98ms ? ?/sec 1.14 324.2±6.52ms ? ?/sec physical_plan_clickbench_q1 1.00 4.6±0.12ms ? ?/sec 1.10 5.0±0.13ms ? ?/sec physical_plan_clickbench_q10 1.00 5.7±0.14ms ? ?/sec 1.16 6.5±0.42ms ? ?/sec physical_plan_clickbench_q11 1.00 5.8±0.22ms ? ?/sec 1.13 6.6±0.21ms ? ?/sec physical_plan_clickbench_q12 1.00 6.0±0.17ms ? ?/sec 1.12 6.7±0.24ms ? ?/sec physical_plan_clickbench_q13 1.00 5.5±0.11ms ? ?/sec 1.12 6.1±0.17ms ? ?/sec physical_plan_clickbench_q14 1.00 5.8±0.17ms ? ?/sec 1.12 6.5±0.15ms ? ?/sec physical_plan_clickbench_q15 1.00 5.6±0.14ms ? ?/sec 1.13 6.3±0.18ms ? ?/sec physical_plan_clickbench_q16 1.00 5.1±0.18ms ? ?/sec 1.09 5.5±0.19ms ? ?/sec physical_plan_clickbench_q17 1.00 5.0±0.13ms ? ?/sec 1.14 5.8±0.15ms ? ?/sec physical_plan_clickbench_q18 1.00 4.9±0.13ms ? ?/sec 1.12 5.4±0.15ms ? ?/sec ... ``` ### Describe the solution you'd like I would like to make a new PR that reduces the size of `Expr` ### Describe alternatives you've considered I suggest 1. Change `Expr::WindowFunction(WindowFunction`) --> `Expr::WindowFunction(Box<WindowFunction>)` as described on https://github.com/apache/datafusion/pull/14366 2. Add a regression test for `Expr` size to ensure we don't get a regression again ### Additional context I recommend: 1. Updating the Expr::WindowFunction definition 2. Letting the compiler guide you to code that needs to be updated and follow the pattern from https://github.com/apache/datafusion/pull/14366 3. Copy the tests from https://github.com/apache/datafusion/pull/14366 -- 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