jcsherin commented on code in PR #12374:
URL: https://github.com/apache/datafusion/pull/12374#discussion_r1748091147
##########
datafusion/expr/src/expr_schema.rs:
##########
@@ -352,7 +358,18 @@ impl ExprSchemable for Expr {
}
}
WindowFunctionDefinition::AggregateUDF(func) =>
Ok(func.is_nullable()),
- WindowFunctionDefinition::WindowUDF(udwf) =>
Ok(udwf.nullable()),
+ WindowFunctionDefinition::WindowUDF(udwf) => {
+ let data_types = args
+ .iter()
+ .map(|e| e.get_type(input_schema))
+ .collect::<Result<Vec<_>>>()?;
+ let input_types = data_types_with_window_udf(&data_types,
udwf)?;
+ let function_name = self.schema_name().to_string();
+ let field_args =
+ WindowUDFFieldArgs::new(&input_types, &function_name);
+
+ udwf.field(field_args).map(|field| field.is_nullable())
+ }
Review Comment:
Same here. The nullability of the Window UDF result is derived from the
`field` trait method.
--
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]