lgbo-ustc commented on issue #7630:
URL: 
https://github.com/apache/incubator-gluten/issues/7630#issuecomment-2428335519

   Compare two ways of conversation
   ```sql
   SELECT if(toInt64OrNull(s) IS NULL, CAST(CAST(s, 'Double'), 'Int64'), 
toInt64OrNull(s))
   FROM t1
   SETTINGS max_threads = 1
   FORMAT `Null`
   
   Query id: 0e20efc6-4ebf-4a7f-abc6-6736aee5a118
   
   Ok.
   
   0 rows in set. Elapsed: 3.676 sec. Processed 100.00 million rows, 1.79 GB 
(27.20 million rows/s., 487.35 MB/s.)
   Peak memory usage: 8.50 MiB.
   ```
   
   ```sql
   SELECT CAST(CAST(s, 'Variant(Int64, Double)'), 'Int64')
   FROM t1
   SETTINGS max_threads = 1
   FORMAT `Null`
   
   Query id: 4ab2b530-14ff-4864-a110-b29bf20ad965
   
   Ok.
   
   0 rows in set. Elapsed: 8.530 sec. Processed 100.00 million rows, 1.79 GB 
(11.72 million rows/s., 210.05 MB/s.)
   ```


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