Copilot commented on code in PR #23164:
URL: https://github.com/apache/datafusion/pull/23164#discussion_r3468269589
##########
datafusion/spark/src/function/string/elt.rs:
##########
@@ -69,9 +69,9 @@ impl ScalarUDFImpl for SparkElt {
fn coerce_types(&self, arg_types: &[DataType]) -> Result<Vec<DataType>> {
let length = arg_types.len();
if length < 2 {
- plan_datafusion_err!(
+ return Err(plan_datafusion_err!(
"ELT function expects at least 2 arguments: index, value1"
- );
+ ));
}
Review Comment:
The restored arity validation in `coerce_types` changes observable behavior
(ELT now errors at plan time for <2 args), but there is no unit test covering
this error path. Adding a regression test would prevent this from silently
breaking again (e.g., due to future refactors around type coercion / UDF
signatures).
--
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]