nuno-faria commented on code in PR #23756:
URL: https://github.com/apache/datafusion/pull/23756#discussion_r3625050839
##########
datafusion/sqllogictest/test_files/expr.slt:
##########
@@ -1724,6 +1724,66 @@ SELECT digest('','blake3');
----
af1349b9f5f9a1a6a0404dea36dcc9499bcb25c9adc112b7cc9a93cae41f3262
+# digest every supported algorithm over an array
+query BBBBBBBB
+SELECT
+ digest(column1, 'md5') = digest('tom', 'md5'),
+ digest(column1, 'sha224') = digest('tom', 'sha224'),
+ digest(column1, 'sha256') = digest('tom', 'sha256'),
+ digest(column1, 'sha384') = digest('tom', 'sha384'),
+ digest(column1, 'sha512') = digest('tom', 'sha512'),
+ digest(column1, 'blake2s') = digest('tom', 'blake2s'),
+ digest(column1, 'blake2b') = digest('tom', 'blake2b'),
+ digest(column1, 'blake3') = digest('tom', 'blake3')
+FROM (VALUES ('tom'), (NULL)) AS t(column1);
+----
+true true true true true true true true
+NULL NULL NULL NULL NULL NULL NULL NULL
+
+# binary-view, large-utf8, and utf8-view array inputs
+query BBBBBBBB
+SELECT
+ digest(arrow_cast(column1, 'BinaryView'), 'md5') = digest('tom', 'md5'),
+ digest(arrow_cast(column1, 'BinaryView'), 'sha224') = digest('tom',
'sha224'),
+ digest(arrow_cast(column1, 'BinaryView'), 'sha256') = digest('tom',
'sha256'),
+ digest(arrow_cast(column1, 'BinaryView'), 'sha384') = digest('tom',
'sha384'),
+ digest(arrow_cast(column1, 'BinaryView'), 'sha512') = digest('tom',
'sha512'),
+ digest(arrow_cast(column1, 'BinaryView'), 'blake2s') = digest('tom',
'blake2s'),
+ digest(arrow_cast(column1, 'BinaryView'), 'blake2b') = digest('tom',
'blake2b'),
+ digest(arrow_cast(column1, 'BinaryView'), 'blake3') = digest('tom', 'blake3')
+FROM (VALUES ('tom'), (NULL)) AS t(column1);
Review Comment:
```suggestion
FROM (VALUES ('tom'), (NULL), ('mot')) AS t(column1);
```
##########
datafusion/sqllogictest/test_files/expr.slt:
##########
@@ -1724,6 +1724,66 @@ SELECT digest('','blake3');
----
af1349b9f5f9a1a6a0404dea36dcc9499bcb25c9adc112b7cc9a93cae41f3262
+# digest every supported algorithm over an array
+query BBBBBBBB
+SELECT
+ digest(column1, 'md5') = digest('tom', 'md5'),
+ digest(column1, 'sha224') = digest('tom', 'sha224'),
+ digest(column1, 'sha256') = digest('tom', 'sha256'),
+ digest(column1, 'sha384') = digest('tom', 'sha384'),
+ digest(column1, 'sha512') = digest('tom', 'sha512'),
+ digest(column1, 'blake2s') = digest('tom', 'blake2s'),
+ digest(column1, 'blake2b') = digest('tom', 'blake2b'),
+ digest(column1, 'blake3') = digest('tom', 'blake3')
+FROM (VALUES ('tom'), (NULL)) AS t(column1);
+----
+true true true true true true true true
+NULL NULL NULL NULL NULL NULL NULL NULL
+
+# binary-view, large-utf8, and utf8-view array inputs
+query BBBBBBBB
+SELECT
+ digest(arrow_cast(column1, 'BinaryView'), 'md5') = digest('tom', 'md5'),
+ digest(arrow_cast(column1, 'BinaryView'), 'sha224') = digest('tom',
'sha224'),
+ digest(arrow_cast(column1, 'BinaryView'), 'sha256') = digest('tom',
'sha256'),
+ digest(arrow_cast(column1, 'BinaryView'), 'sha384') = digest('tom',
'sha384'),
+ digest(arrow_cast(column1, 'BinaryView'), 'sha512') = digest('tom',
'sha512'),
+ digest(arrow_cast(column1, 'BinaryView'), 'blake2s') = digest('tom',
'blake2s'),
+ digest(arrow_cast(column1, 'BinaryView'), 'blake2b') = digest('tom',
'blake2b'),
+ digest(arrow_cast(column1, 'BinaryView'), 'blake3') = digest('tom', 'blake3')
+FROM (VALUES ('tom'), (NULL)) AS t(column1);
+----
+true true true true true true true true
+NULL NULL NULL NULL NULL NULL NULL NULL
+
+query BB
+SELECT
+ digest(arrow_cast(column1, 'LargeUtf8'), 'md5') = digest('tom', 'md5'),
+ digest(arrow_cast(column1, 'Utf8View'), 'md5') = digest('tom', 'md5')
+FROM (VALUES ('tom'), (NULL)) AS t(column1);
Review Comment:
```suggestion
FROM (VALUES ('tom'), (NULL), ('mot')) AS t(column1);
```
##########
datafusion/sqllogictest/test_files/expr.slt:
##########
@@ -1724,6 +1724,66 @@ SELECT digest('','blake3');
----
af1349b9f5f9a1a6a0404dea36dcc9499bcb25c9adc112b7cc9a93cae41f3262
+# digest every supported algorithm over an array
+query BBBBBBBB
+SELECT
+ digest(column1, 'md5') = digest('tom', 'md5'),
+ digest(column1, 'sha224') = digest('tom', 'sha224'),
+ digest(column1, 'sha256') = digest('tom', 'sha256'),
+ digest(column1, 'sha384') = digest('tom', 'sha384'),
+ digest(column1, 'sha512') = digest('tom', 'sha512'),
+ digest(column1, 'blake2s') = digest('tom', 'blake2s'),
+ digest(column1, 'blake2b') = digest('tom', 'blake2b'),
+ digest(column1, 'blake3') = digest('tom', 'blake3')
+FROM (VALUES ('tom'), (NULL)) AS t(column1);
Review Comment:
```suggestion
FROM (VALUES ('tom'), (NULL), ('mot')) AS t(column1);
```
--
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]