pepijnve commented on issue #18548:
URL: https://github.com/apache/datafusion/issues/18548#issuecomment-3507163500

   Not a very exciting topic, but if you want some info for the blog post on 
the `case` work, here are some numbers I got by running some queries on SF10 
lineitems.
   
   ### Just a case expression
   
   ```
   select case l_returnflag
     when 'R' then date_part('year', l_shipdate)
     when 'A' then date_part('year', l_commitdate)
     when 'N' then date_part('year',l_receiptdate)
     else null end
   from lineitem;
   ```
   
   **50.0.0**: ~0.492 seconds
   **51.0.0**: ~0.278 seconds
   
   ### `*`
   
   ```
   select * from lineitem
   ```
   
   **50.0.0**: 0.668 seconds
   **50.1.0**: 0.668 seconds
   
   ### `*` + a case expression
   
   ```
   select *, case l_returnflag
     when 'R' then date_part('year', l_shipdate)
     when 'A' then date_part('year', l_commitdate)
     when 'N' then date_part('year',l_receiptdate)
     else null end
   from lineitem;
   ```
   
   **50.0.0**: ~1.287 seconds -> `case` adds 0,619 seconds
   **51.0.0**: ~0.850 seconds -> `case` adds 0,182 seconds


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