rich7420 commented on issue #7147:
URL: 
https://github.com/apache/datafusion-comet/issues/7147#issuecomment-7281634056

   One more case to track here. A projection sits below another projection, and 
the lower one can throw.
   
   ```sql
   -- t has ids 0 to 4 in one file, and only id = 1 hits the invalid cast.
   SELECT a + a AS b FROM (
     SELECT IF(id = 1, CAST('bad' AS INT), value) AS a FROM t
   ) LIMIT 1
   ```
   
   Spark returns the id = 0 row. On Spark 3.5.9 and 4.1.3, Comet raises 
`CAST_INVALID_INPUT` both when the `LIMIT` is at the root and when it's in a 
subquery. The cap goes under the upper projection only, so the lower one still 
evaluates whole batches. #7195 lists this in the compatibility guide. I have a 
fix on top of #7195 and can open a PR once that merges.
   


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