adriangb commented on code in PR #21984:
URL: https://github.com/apache/datafusion/pull/21984#discussion_r3250764360


##########
datafusion/functions-nested/src/range.rs:
##########
@@ -247,21 +247,73 @@ impl ScalarUDFImpl for Range {
         }
     }
 
+    fn return_field_from_args(&self, args: ReturnFieldArgs) -> 
Result<FieldRef> {
+        if args.arg_fields.iter().any(|f| f.data_type().is_null()) {
+            return Ok(Arc::new(Field::new(self.name(), DataType::Null, true)));
+        }
+        // Reuse the data type computed by `return_type` so the date64→date32
+        // coercion and timezone preservation logic stays in one place. Then
+        // walk the result and replace the inner field with a metadata-bearing
+        // copy of the start arg's field so extension types flow through.
+        let arg_types: Vec<_> = args

Review Comment:
   You are right. I removed `range()`



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