martin-g commented on code in PR #19518:
URL: https://github.com/apache/datafusion/pull/19518#discussion_r2654796870


##########
datafusion/sqllogictest/test_files/errors.slt:
##########
@@ -125,7 +125,7 @@ from aggregate_test_100
 order by c9
 
 # WindowFunction wrong signature
-statement error DataFusion error: Error during planning: Failed to coerce 
arguments to satisfy a call to 'nth_value' function: coercion from Int32, 
Int64, Int64 to the signature OneOf\(\[Any\(0\), Any\(1\), Any\(2\)\]\) failed
+statement error DataFusion error: Error during planning: Internal error: 
Function 'nth_value' failed to match any signature

Review Comment:
   Is it really an `Internal error` ?
   It is an error caused by the user's input.



##########
datafusion/expr/src/type_coercion/functions.rs:
##########
@@ -323,69 +339,15 @@ fn get_valid_types_with_scalar_udf(
 
             // Every signature failed, return the joined error
             if res.is_empty() {
-                internal_err!(
+                return internal_err!(

Review Comment:
   I think this should be a `plan_err!()`



-- 
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]

Reply via email to