rluvaton commented on code in PR #19182:
URL: https://github.com/apache/datafusion/pull/19182#discussion_r2596537420
##########
datafusion/spark/src/function/string/length.rs:
##########
@@ -279,4 +286,38 @@ mod tests {
Ok(())
}
+
+ #[test]
+ fn test_spark_length_nullability() -> Result<()> {
+ let func = SparkLengthFunc::new();
+
+ let nullable_field: FieldRef =
+ Arc::new(Field::new("col", DataType::Utf8, true));
+
+ let out_nullable = func.return_field_from_args(ReturnFieldArgs {
+ arg_fields: &[nullable_field],
+ scalar_arguments: &[],
Review Comment:
there should be the same number of `scalar_arguments` and `arg_fields`, if
something is not scalar than None is used.
```suggestion
scalar_arguments: &[None],
```
--
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]