Jefffrey commented on issue #5538:
URL: 
https://github.com/apache/arrow-datafusion/issues/5538#issuecomment-1463394118

   Note that the SQL itself actually doesn't work, but the explain for it does 
(which is what the tpc-ds logical tests are checking). On latest main:
   
   ```sql
   DataFusion CLI v19.0.0
   ❯ select CASE 10.5 WHEN 0 THEN null ELSE 10 END as col;
   Arrow error: Cast error: Cannot compare two arrays of different types (Int64 
and Float64)
   ❯ explain select CASE 10.5 WHEN 0 THEN null ELSE 10 END as col;
   
+---------------+-------------------------------------------------------------------------------------------------+
   | plan_type     | plan                                                       
                                     |
   
+---------------+-------------------------------------------------------------------------------------------------+
   | logical_plan  | Projection: CASE Float64(10.5) WHEN Int64(0) THEN 
CAST(NULL AS Int64) ELSE Int64(10) END AS col |
   |               |   EmptyRelation                                            
                                     |
   | physical_plan | ProjectionExec: expr=[CASE 10.5 WHEN 0 THEN CAST(NULL AS 
Int64) ELSE 10 END as col]             |
   |               |   EmptyExec: produce_one_row=true                          
                                     |
   |               |                                                            
                                     |
   
+---------------+-------------------------------------------------------------------------------------------------+
   2 rows in set. Query took 0.004 seconds.
   ❯
   ```
   
   This bug seems separate from what #5343 addresses, and seems likely due to a 
type coercion bug is my guess.


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

Reply via email to