Jefffrey commented on code in PR #18664:
URL: https://github.com/apache/datafusion/pull/18664#discussion_r2521921893


##########
datafusion/functions/src/crypto/basic.rs:
##########
@@ -84,18 +81,7 @@ define_digest_function!(
     "computes blake3 hash digest of the given input"
 );
 
-macro_rules! digest_to_scalar {

Review Comment:
   Moved down, closer to where it's actually used



##########
datafusion/functions/src/crypto/basic.rs:
##########
@@ -107,23 +93,6 @@ pub enum DigestAlgorithm {
     Blake3,
 }
 
-/// Digest computes a binary hash of the given data, accepts Utf8 or LargeUtf8 
and returns a [`ColumnarValue`].
-/// Second argument is the algorithm to use.
-/// Standard algorithms are md5, sha1, sha224, sha256, sha384 and sha512.
-pub fn digest(args: &[ColumnarValue]) -> Result<ColumnarValue> {

Review Comment:
   Moved to `digest.rs` as that is the only place it is used



##########
datafusion/functions/src/crypto/basic.rs:
##########
@@ -251,49 +214,7 @@ impl DigestAlgorithm {
         })
     }
 
-    /// digest a binary array to their hash values
-    pub fn digest_binary_array<T>(self, value: &dyn Array) -> 
Result<ColumnarValue>
-    where
-        T: OffsetSizeTrait,

Review Comment:
   Essentially inlined these, as didn't see much benefit and they were adding 
more indirection



##########
datafusion/functions/src/crypto/basic.rs:
##########
@@ -198,25 +167,7 @@ fn hex_encode<T: AsRef<[u8]>>(data: T) -> String {
     }
     s
 }
-pub fn utf8_or_binary_to_binary_type(

Review Comment:
   Refactored away, was only used for return types in sha/md5/digest (which are 
now simplified)



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