shehabgamin commented on code in PR #14268:
URL: https://github.com/apache/datafusion/pull/14268#discussion_r1929721662


##########
datafusion/sqllogictest/test_files/expr.slt:
##########
@@ -571,8 +601,10 @@ select repeat('-1.2', arrow_cast(3, 'Int32'));
 ----
 -1.2-1.2-1.2
 
-query error DataFusion error: Error during planning: Internal error: Expect 
TypeSignatureClass::Native\(LogicalType\(Native\(Int64\), Int64\)\) but 
received Float64
+query T
 select repeat('-1.2', 3.2);

Review Comment:
   Maybe the 2nd arg should be `TypeSignatureClass::Integer` instead of 
`TypeSignatureClass::Native(logical_int64())`? It's currently unimplemented 
with a `TODO`: 
https://github.com/apache/datafusion/blob/f77579108d1dc0285636fbfb24507d2bfca66446/datafusion/expr-common/src/signature.rs#L216-L218
   
   Otherwise, it would seem strange to deviate from the behavior specified in 
the implementation of `default_cast_for`for `NativeType`.
   
   I do think that we should prioritize being permissive and general-purpose 
though as I was discussing here: 
https://github.com/apache/datafusion/issues/14296#issuecomment-2614200125



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to