kumarUjjawal commented on code in PR #20112:
URL: https://github.com/apache/datafusion/pull/20112#discussion_r2757144630
##########
datafusion/functions/src/string/to_hex.rs:
##########
@@ -78,6 +77,14 @@ where
Ok(Arc::new(result) as ArrayRef)
}
+#[inline]
+fn to_hex_scalar<T: ToHex>(value: T) -> String {
+ let mut hex_buffer = [0u8; 16];
Review Comment:
Thanks for the feedback. My initial thinking was the scalar fast path buffer
is a fixed 16‑byte stack array, so it’s already very cheap and not
heap-allocating. The array path is where buffer reuse matters and we already
reuse a single buffer across the whole batch there. What do you think, should
we still go ahead with the buffer reuse change?
--
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]