pepijnve opened a new pull request, #18055:
URL: https://github.com/apache/datafusion/pull/18055

   ## Which issue does this PR close?
   
   Not logged yet
   
   ## Rationale for this change
   
   When `CaseExpr` calls `PhysicalExpr::evaluate_selection` that function will 
filter the entire input `RecordBatch` before calling `PhysicalExpr::evaluate`. 
This filtering filters all columns of the `RecordBatch`, even ones that will 
not be accessed by the `PhysicalExpr`. For wide record batches and narrow 
expressions it can be beneficial to project the record batch first to reduce 
the amount of wasted filtering work.
   
   ## What changes are included in this PR?
   
   - Adds a `ProjectedExpr` type which projects incoming record batches and 
then evaluates a project version of the original `PhysicalExpr`
   
   ## Are these changes tested?
   
   - Covered by existing tests
   - Micro benchmark for `case` has been extended
   
   ## Are there any user-facing changes?
   
   No


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