martin-g commented on code in PR #19236:
URL: https://github.com/apache/datafusion/pull/19236#discussion_r2606895914
##########
datafusion/spark/src/function/datetime/make_dt_interval.rs:
##########
@@ -99,7 +101,16 @@ impl ScalarUDFImpl for SparkMakeDtInterval {
///
/// [Sail compatibility doc]:
https://github.com/lakehq/sail/blob/dc5368daa24d40a7758a299e1ba8fc985cb29108/docs/guide/dataframe/data-types/compatibility.md?plain=1#L260
fn return_type(&self, _arg_types: &[DataType]) -> Result<DataType> {
- Ok(DataType::Duration(Microsecond))
+ internal_err!("return_field_from_args should be used instead")
+ }
+
+ fn return_field_from_args(&self, args: ReturnFieldArgs) ->
Result<FieldRef> {
+ let nullable = args.arg_fields.iter().any(|f| f.is_nullable());
Review Comment:
This is not enough.
See
https://github.com/apache/datafusion/pull/19236/files#diff-c1ad8cc4eaab5f736bb30342887defb1d018651dda5850924d8b4ed463bf2d8fR173
If `secs` is NAN/infinite then it is considered as a NULL.
--
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]