jayzhan211 commented on code in PR #14268: URL: https://github.com/apache/datafusion/pull/14268#discussion_r1942530489
########## datafusion/expr/src/type_coercion/functions.rs: ########## @@ -584,23 +541,36 @@ fn get_valid_types( match target_type_class { TypeSignatureClass::Native(native_type) => { let target_type = native_type.native(); - if &logical_type == target_type { - return target_type.default_cast_for(current_type); + if &logical_type == target_type + || logical_type == NativeType::Null Review Comment: This should be `target_type.default_cast_for(current_type)` only -- 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