codetyri0n commented on code in PR #19235:
URL: https://github.com/apache/datafusion/pull/19235#discussion_r2610169298


##########
datafusion/spark/src/function/math/hex.rs:
##########
@@ -52,8 +54,33 @@ impl Default for SparkHex {
 
 impl SparkHex {
     pub fn new() -> Self {
+        let int64 = Coercion::new_implicit(
+            TypeSignatureClass::Native(logical_int64()),
+            vec![TypeSignatureClass::Integer, TypeSignatureClass::Numeric],
+            NativeType::Int64,
+        );
+        let string = Coercion::new_implicit(
+            TypeSignatureClass::Native(logical_string()),
+            vec![TypeSignatureClass::Native(logical_string())],
+            NativeType::String,
+        );
+        let binary = Coercion::new_implicit(
+            TypeSignatureClass::Native(logical_binary()),
+            vec![TypeSignatureClass::Binary],

Review Comment:
   my idea was to use explain analyze to determine if LargeBinary comes under 
native binary using a query in which I cast like - `SELECT 
hex(arrow_cast(arrow_cast('test', 'Binary'), 'LargeBinary'));` which did not 
give anything conclusive.
   so I tested out an slt with `SELECT hex(arrow_cast('test', 'LargeBinary')) 
as lar_b;` after commenting out
    ` TypeSignature::Exact(vec![DataType::LargeBinary]),` ---- which passed 
without any failure.
    
   to conclude - we can now be sure that LargeBinary is encompassed under the 
native Binary right? 
   lmk your thoughts @martin-g @Jefffrey 



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