rluvaton commented on code in PR #19182:
URL: https://github.com/apache/datafusion/pull/19182#discussion_r2596485794


##########
datafusion/spark/src/function/string/length.rs:
##########
@@ -92,6 +93,11 @@ impl ScalarUDFImpl for SparkLengthFunc {
     fn aliases(&self) -> &[String] {
         &self.aliases
     }
+
+    fn return_field_from_args(&self, args: ReturnFieldArgs) -> 
Result<FieldRef> {
+        let nullable = args.arg_fields.iter().any(|f| f.is_nullable());
+        Ok(Arc::new(Field::new(self.name(), Boolean, nullable)))

Review Comment:
   this function does not return a boolean but Int32, see the `return_type` 
function above.
   
   can you please also add a test that it is nullable when the child is nullable



-- 
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]

Reply via email to