1fanwang commented on code in PR #25964:
URL: https://github.com/apache/datafusion/pull/25964#discussion_r4330690214
##########
datafusion/functions/src/core/nvl.rs:
##########
@@ -140,6 +159,23 @@ impl ScalarUDFImpl for NVLFunc {
self.coalesce.short_circuits()
}
+ fn coerce_types(&self, arg_types: &[DataType]) -> Result<Vec<DataType>> {
+ if arg_types.len() != 2 {
+ return exec_err!(
+ "nvl expects exactly two arguments, but received {}",
+ arg_types.len()
+ );
+ }
Review Comment:
Done in
https://github.com/apache/datafusion/commit/c6c46de8aeb39a34d2b61c9a68b3b98b269ac02e.
Uses the shared arity helper.
--
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]