Jefffrey commented on PR #20086:
URL: https://github.com/apache/datafusion/pull/20086#issuecomment-3894502938

   > I’m wondering if a 'probing' approach might be more suitable for error 
hints. For example, if a user provides Int32 + Utf8, when an error occurs, we 
could first test Int32 + x across various types of x to see if it succeeds, 
then try x + Utf8, and finally offer suggestions for candidate function 
signatures. Of course, the actual implementation would need to account for 
trying similar types first, the possibility that fixing one operand might still 
not yield a valid suggestion, and cases like subtraction where the order of 
operands matters.
   
   I'm not as familiar with the current operator related code, though I wonder 
if it's possible to be more proactive, as this sounds more like a reactive 
approach? Proactive in the sense of how UDFs have an explicit signature to 
define which types they coerce to, making them easier to reason about. Though I 
do think trying to introduce the UDF framework to operators (even as an inner 
field) might be a bit clunky 🤔 


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