myandpr commented on code in PR #21032:
URL: https://github.com/apache/datafusion/pull/21032#discussion_r2986600430


##########
datafusion/sqllogictest/test_files/spark/math/hex.slt:
##########
@@ -56,7 +56,7 @@ SELECT hex(column1) FROM VALUES (arrow_cast('hello', 
'LargeBinary')), (NULL), (a
 NULL
 776F726C64
 
-statement error Function 'hex' expects 1 arguments but received 2
+statement error DataFusion error: Error during planning: Function 'hex' failed 
to match any signature

Review Comment:
   I agree the previous `hex(1, 2)` error was more actionable.
   
   The current change intentionally fixes the `Internal error` path in 
`TypeSignature::OneOf`, but it does make some overload failures fall back to a 
more generic planning error. I avoided surfacing a branch-specific `OneOf` 
error directly because that turned out to be incorrect in other cases, for 
example mixed-arity overloads like `nth_value(c5, 2, 3)` or mixed-type 
overloads like `sum(bool_col)`.
   
   Do you think we should try to preserve more actionable planner diagnostics 
for cases like this in the current PR, or handle that in a follow-up by 
choosing the best `OneOf` planning error?
   
   Let me know if you have any preference.



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