alamb commented on code in PR #12192:
URL: https://github.com/apache/datafusion/pull/12192#discussion_r1733245581


##########
datafusion/common/src/scalar/mod.rs:
##########
@@ -3648,6 +3648,12 @@ fn fmt_list(arr: ArrayRef, f: &mut fmt::Formatter) -> 
fmt::Result {
 
 impl fmt::Debug for ScalarValue {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        fn fmt_binary(data: &[u8]) -> String {

Review Comment:
   I think this allocates a new string for each byte... Perhaps it would be 
better if this called `write!` directly on the formatter. Something like
   
   
   
   ```suggestion
           fn fmt_binary(data: &[u8], f: &mut fmt::Formatter) -> fmt::Result {
   ```



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