kumarUjjawal commented on code in PR #19248:
URL: https://github.com/apache/datafusion/pull/19248#discussion_r2644154404


##########
datafusion/spark/src/function/datetime/make_interval.rs:
##########
@@ -119,7 +121,18 @@ impl ScalarUDFImpl for SparkMakeInterval {
     }
 
     fn return_type(&self, _arg_types: &[DataType]) -> Result<DataType> {
-        Ok(Interval(MonthDayNano))
+        internal_err!("return_field_from_args should be used instead")
+    }
+
+    fn return_field_from_args(&self, args: ReturnFieldArgs) -> 
Result<FieldRef> {
+        // zero-arg form is a deterministic non-null scalar; any call with args
+        // can emit NULL on overflow or non-finite seconds, so mark those 
nullable.
+        let nullable = !args.arg_fields.is_empty();

Review Comment:
   Made the changes should be consistent with the spark, if there are any more 
changes required, do let me know. Thanks for checking the consistency with 
Spark.



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