shehabgamin commented on code in PR #14268: URL: https://github.com/apache/datafusion/pull/14268#discussion_r1944122850
########## datafusion/functions/src/string/ascii.rs: ########## @@ -93,6 +95,33 @@ impl ScalarUDFImpl for AsciiFunc { make_scalar_function(ascii, vec![])(args) } + fn coerce_types(&self, arg_types: &[DataType]) -> Result<Vec<DataType>> { + if arg_types.len() != 1 { + return plan_err!( + "The {} function requires 1 argument, but got {}.", + self.name(), + arg_types.len() + ); + } + + let arg_type = &arg_types[0]; + let current_native_type: NativeType = arg_type.into(); + let target_native_type = NativeType::String; + if current_native_type.is_integer() Review Comment: @jayzhan211 Forsure, let's make sure @alamb is okay with this too before I go ahead and make the change. -- 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