wangyum opened a new pull request #27436: [SPARK-30705][SQL] Improve CaseWhen 
sub-expression equality
URL: https://github.com/apache/spark/pull/27436
 
 
   ### What changes were proposed in this pull request?
   For CaseWhen, we currently only support the first condition expression. This 
PR improves this pattern:
   ```sql
   CASE WHEN testUdf(a) > 3 THEN 4
   WHEN testUdf(a) = 3 THEN 3
   WHEN testUdf(a) = 2 THEN 2
   WHEN testUdf(a) = 1 THEN 1
   ELSE 0 END
   ```
   
   ### Why are the changes needed?
   Improve query performance.
   
   
   ### Does this PR introduce any user-facing change?
   No.
   
   
   ### How was this patch tested?
   Unit test.
   

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