LiaCastaneda commented on PR #25456:
URL: https://github.com/apache/datafusion/pull/25456#issuecomment-7061586582

   👋 I ran into an inefficiency in some large queries with a many `OR` filter 
(hundreds) on columns computed by expensive expressions (UDFs + higher order 
functions). Seems DF inlines the column's definition into every branch, so the 
expression is evaluated once per branch for every row instead of once per row. 
I opened #27631 with a minimal repro and  some benchmarks results. It's a bit 
tricky without a cost model, but ideally I guess we should keep the filter 
above the projection (so not inline) when the cost of the expression × the 
number of copies is higher than what pushing down saves


-- 
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]

Reply via email to