shinzoxD commented on issue #11570:
URL: https://github.com/apache/datafusion/issues/11570#issuecomment-5304556639

   I'd like to pick this up.
   
   #19994 showed that replacing the CASE with a fully vectorized divide 
(eq/zip/div/nullif, always dividing every row) wins when few denominators are 
zero, but loses when many are. After #20097 and #20498 the general CASE path is 
in better shape.
   
   This attempt uses a different approach:
   - Keep the WHEN predicate so `> / != / < all stay correct (the SLTs added 
during the #19994 review)
   - Null the divisor on rows the WHEN excludes, then divide — skipped rows 
become NULL instead of dummy-dividing by 1
   - Only apply when the checked operand is the same as the divisor (including 
through Cast)
   
   I'll open a PR shortly.


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