You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "andygrove (via GitHub)" <gi...@apache.org> on 2024/07/15 23:02:44 UTC

[I] Optimize CASE WHEN for "expression or null" case [datafusion]

andygrove opened a new issue, #11484:
URL: https://github.com/apache/datafusion/issues/11484

   ### Is your feature request related to a problem or challenge?
   
   Given the expression `CASE WHEN predicate THEN expr ELSE null END` (as seen in some TPC-DS queries) we could do better than using our generic `CaseExpr`. In this specific case we can evaluate `expr` and create a new array using the existing data buffer but just replace the null mask with the results of evaluating the `predicate`.
   
   ### Describe the solution you'd like
   
   _No response_
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
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-unsubscribe@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Optimize CASE WHEN for "expression or null" case [datafusion]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove closed issue #11484: Optimize CASE WHEN for "expression or null" case
URL: https://github.com/apache/datafusion/issues/11484


-- 
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-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] Optimize CASE WHEN for "expression or null" case [datafusion]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on issue #11484:
URL: https://github.com/apache/datafusion/issues/11484#issuecomment-2230755785

   I am implementing this in Comet in https://github.com/apache/datafusion-comet/pull/672 and plan on upstreaming to DataFusion soon. The optimization is resulting in a > 10x speedup for my test case.
   
          


-- 
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-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org