jayzhan211 commented on code in PR #14268: URL: https://github.com/apache/datafusion/pull/14268#discussion_r1933110734
########## datafusion/expr/src/type_coercion/functions.rs: ########## @@ -584,23 +544,7 @@ fn get_valid_types( match target_type_class { TypeSignatureClass::Native(native_type) => { let target_type = native_type.native(); - if &logical_type == target_type { Review Comment: As a rule of thumb, stick to either Postgres or DuckDB for functions, and avoid overly broad type casting that allows any type to convert to any other. This can turn invalid queries into valid ones, making errors harder to catch, especially when tests donβt cover all cases. Based on that, 1. Cast from Binary to String ππ» 2. Cast from Numeric to String ππ» (At least for the string functions changed in this PR) 3. Cast from Float to Integer ππ» (At least not for `repeat`) -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org