findepi commented on PR #15110:
URL: https://github.com/apache/datafusion/pull/15110#issuecomment-2713266973
> @findepi I wonder if you have some time to double check the correctness of
this optimization (distributing a cast)
unwrapping cast is not an easy feat. The current implementation isn't
exactly correct, as it conflates different strings which cast back to the same
number:
```sql
CREATE OR REPLACE TABLE t AS SELECT arrow_cast('123', 'Int64') a;
-- correctly finds the row
SELECT * FROM t WHERE cast(a AS string) = '123';
-- incorrectly also finds the row
SELECT * FROM t WHERE cast(a AS string) = '0123';
```
--
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]