asolimando commented on PR #22343:
URL: https://github.com/apache/datafusion/pull/22343#issuecomment-4485829535

   > Perhaps this kind of reordering could be implemented as a runtime 
optimization inside `FilterExec`: for the first batch, track each conjunct's 
evaluation time and selectivity, then decide the order dynamically. One nice 
benefit of this approach is that we don't have to hardcode whether an 
expression is "expensive" or "cheap".
   
   I think it's still useful to be able to re-order "statically" as you might 
want to use statistics for that, which might be more stable then dynamic 
approaches, which are usually sensitive to the "shape" of the first part of the 
data, and the choice is usually not revisited (and even in that case, it might 
fluctuate, while in some cases the static order could be the optimal one).
   
   I think it's good to have multiple options, as long as downstream users can 
mix and match what works best for them, and they can "easily" correct course 
for problematic queries without the need of code changes.


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