martin-g commented on code in PR #20317:
URL: https://github.com/apache/datafusion/pull/20317#discussion_r2820855205


##########
datafusion/functions/src/string/concat.rs:
##########
@@ -207,7 +207,7 @@ impl ScalarUDFImpl for ConcatFunc {
                         DataType::Utf8View => {
                             let string_array = as_string_view_array(array)?;
 
-                            data_size += string_array.len();
+                            data_size += 
string_array.total_buffer_bytes_used();

Review Comment:
   This does not include the inlined strings (shorter than 12 bytes). An array 
of only short strings will report `0`.
   Is this a problem ?!
   
   If YES then let's use something like:
   ```rust
   self.views().iter().sum().min(usize::MAX) as usize
   ```



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