maropu commented on issue #26294: [SPARK-28477] [SQL] Rewrite CaseWhen with 
single branch to If
URL: https://github.com/apache/spark/pull/26294#issuecomment-550075710
 
 
   > Looks like it saves about a microsecond. Pretty trivial but a win's a win? 
given there is very little extra complexity. @maropu is it possibly a win here 
that the generated code is a little smaller? maybe it helps when this is part 
of a large plan?
   
   Yea, that might be so. As shown above, this optimization can makes the 
generated code a bit more simpler, so IMO JVM JIT might be able to optimize it 
easily and it has no harm on performance. But, the gain seems to be trivial, so 
I don't have a strong preference.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to