This is an automated email from the ASF dual-hosted git repository.
jiayuliu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/master by this push:
new 9c5ccae update md-5, sha2, blake2 (#1647)
9c5ccae is described below
commit 9c5ccae240ce38b084128e8d7ff0752d0e2318a6
Author: xudong.w <[email protected]>
AuthorDate: Sun Jan 23 09:58:34 2022 +0800
update md-5, sha2, blake2 (#1647)
---
datafusion/Cargo.toml | 6 +++---
datafusion/src/physical_plan/crypto_expressions.rs | 10 +++++-----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/datafusion/Cargo.toml b/datafusion/Cargo.toml
index 6897780..317ac2e 100644
--- a/datafusion/Cargo.toml
+++ b/datafusion/Cargo.toml
@@ -64,9 +64,9 @@ pin-project-lite= "^0.2.7"
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread",
"sync", "fs"] }
tokio-stream = "0.1"
log = "^0.4"
-md-5 = { version = "^0.9.1", optional = true }
-sha2 = { version = "^0.9.1", optional = true }
-blake2 = { version = "^0.9.2", optional = true }
+md-5 = { version = "^0.10.0", optional = true }
+sha2 = { version = "^0.10.1", optional = true }
+blake2 = { version = "^0.10.2", optional = true }
blake3 = { version = "1.0", optional = true }
ordered-float = "2.0"
unicode-segmentation = { version = "^1.7.1", optional = true }
diff --git a/datafusion/src/physical_plan/crypto_expressions.rs
b/datafusion/src/physical_plan/crypto_expressions.rs
index 4ad3087..2507a8d 100644
--- a/datafusion/src/physical_plan/crypto_expressions.rs
+++ b/datafusion/src/physical_plan/crypto_expressions.rs
@@ -28,7 +28,7 @@ use arrow::{
},
datatypes::DataType,
};
-use blake2::{Blake2b, Blake2s, Digest};
+use blake2::{Blake2b512, Blake2s256, Digest};
use blake3::Hasher as Blake3;
use md5::Md5;
use sha2::{Sha224, Sha256, Sha384, Sha512};
@@ -115,8 +115,8 @@ impl DigestAlgorithm {
Self::Sha256 => digest_to_scalar!(Sha256, value),
Self::Sha384 => digest_to_scalar!(Sha384, value),
Self::Sha512 => digest_to_scalar!(Sha512, value),
- Self::Blake2b => digest_to_scalar!(Blake2b, value),
- Self::Blake2s => digest_to_scalar!(Blake2s, value),
+ Self::Blake2b => digest_to_scalar!(Blake2b512, value),
+ Self::Blake2s => digest_to_scalar!(Blake2s256, value),
Self::Blake3 => ScalarValue::Binary(value.as_ref().map(|v| {
let mut digest = Blake3::default();
digest.update(v.as_bytes());
@@ -145,8 +145,8 @@ impl DigestAlgorithm {
Self::Sha256 => digest_to_array!(Sha256, input_value),
Self::Sha384 => digest_to_array!(Sha384, input_value),
Self::Sha512 => digest_to_array!(Sha512, input_value),
- Self::Blake2b => digest_to_array!(Blake2b, input_value),
- Self::Blake2s => digest_to_array!(Blake2s, input_value),
+ Self::Blake2b => digest_to_array!(Blake2b512, input_value),
+ Self::Blake2s => digest_to_array!(Blake2s256, input_value),
Self::Blake3 => {
let binary_array: BinaryArray = input_value
.iter()