tustvold commented on code in PR #5178:
URL: https://github.com/apache/arrow-rs/pull/5178#discussion_r1417947465


##########
parquet/src/arrow/array_reader/byte_array_dictionary.rs:
##########
@@ -339,8 +332,8 @@ where
                     Some(keys) => {
                         // Happy path - can just copy keys
                         // Keys will be validated on conversion to arrow
-                        let keys_slice = keys.spare_capacity_mut(range.start + 
len);

Review Comment:
   This was actually incorrect, but didn't matter as spare_capacity_mut didn't 
update the length of the buffer directly, and so this would just allocate more 
space than necessary



##########
parquet/src/arrow/array_reader/byte_array_dictionary.rs:
##########
@@ -339,8 +332,8 @@ where
                     Some(keys) => {
                         // Happy path - can just copy keys
                         // Keys will be validated on conversion to arrow
-                        let keys_slice = keys.spare_capacity_mut(range.start + 
len);

Review Comment:
   This was actually incorrect, but didn't matter as spare_capacity_mut didn't 
update the length of the buffer directly, and so this would just potentially 
allocate more space than necessary



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

Reply via email to