floze-the-genius commented on code in PR #23688:
URL: https://github.com/apache/datafusion/pull/23688#discussion_r3673503469


##########
datafusion/spark/src/function/math/hex.rs:
##########
@@ -340,27 +330,27 @@ pub fn compute_hex(
                     }
                     DataType::Utf8 => {
                         let arr = as_string_array(dict_values);
-                        hex_encode_bytes(arr.iter(), lowercase, arr.len())?
+                        hex_encode_bytes(&arr, lowercase)?
                     }
                     DataType::LargeUtf8 => {
                         let arr = as_largestring_array(dict_values);
-                        hex_encode_bytes(arr.iter(), lowercase, arr.len())?
+                        hex_encode_bytes(&arr, lowercase)?
                     }
                     DataType::Utf8View => {
                         let arr = as_string_view_array(dict_values)?;
-                        hex_encode_bytes(arr.iter(), lowercase, arr.len())?
+                        hex_encode_bytes(&arr, lowercase)?
                     }
                     DataType::Binary => {

Review Comment:
   Added `test_dict_binary_values_null` in `af3fafa65`. It uses dictionary keys 
`[0, null, 1]` with Binary values `[b"hi", null]` and verifies the encoded 
dictionary preserves the null value.



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