kosiew commented on code in PR #23688:
URL: https://github.com/apache/datafusion/pull/23688#discussion_r3655344999
##########
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:
Could we add a small regression test for a dictionary-backed Binary or
LargeBinary array where `dict.values()` itself contains a null, rather than
only testing null dictionary keys? The new byte-array path preserves the values
array `NullBuffer` directly. We already cover this shape for `Int64` in
`test_dict_values_null`, so matching binary coverage would help pin down this
updated path. This is optional and does not need to block the PR.
--
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]