paleolimbot commented on code in PR #27102:
URL: https://github.com/apache/datafusion/pull/27102#discussion_r4489455923
##########
datafusion/core/tests/user_defined/user_defined_scalar_functions.rs:
##########
@@ -1016,7 +1016,10 @@ impl TryFrom<CreateFunction> for ScalarFunctionWrapper {
type_signatures.push(TypeSignature::Nullary)
} else {
type_signatures.push(TypeSignature::Exact(
- args.iter().take(n).map(|a|
a.data_type.clone()).collect(),
+ args.iter()
+ .take(n)
+ .map(|a| a.field.data_type().clone())
+ .collect(),
Review Comment:
The `Signature` has no way to match an extension type here and so I think
this is OK (the alternative would be to use Any and enforce in
`return_field()`).
##########
datafusion/core/tests/user_defined/user_defined_scalar_functions.rs:
##########
@@ -1337,10 +1342,10 @@ async fn
create_scalar_function_from_sql_statement_postgres_syntax() -> Result<(
quote_style: None,
span: Span::empty(),
}),
- data_type: DataType::Utf8View,
+ field: Arc::new(Field::new("name", DataType::Utf8View, true)),
default_expr: None,
}]),
- return_type: Some(DataType::Int32),
+ return_field: Some(Arc::new(Field::new("", DataType::Int32, true))),
Review Comment:
Can we use `into_nullable_field_ref()` here?
--
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]