jayzhan211 commented on PR #15110:
URL: https://github.com/apache/datafusion/pull/15110#issuecomment-2716395289
> I don't believe manipulating casts after-the-fact is the right approach.
> Given the query select * from t1 where column1 < '10'; where column1 is an
Int32, the literal '10' should be treated as unknown, and the preference should
be to cast that. The generated predicate should then be column1 < cast('10' as
int), and whatever const folding happens will then take care of parsing '10' as
an int during planning.
> Without a proper "unknown" type, I think it should be sufficient to rank
implicitly casting to utf8 last compared to any other implicit cast.
Maybe we can figure out if it is possible to parse to the idea type for
scalar, so '123' can be casted to i64 not str and '1.2' can be casted to float
not str.
--
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]