alamb commented on code in PR #12340:
URL: https://github.com/apache/arrow-rs/pull/12340#discussion_r4643782532


##########
arrow-csv/src/reader/records.rs:
##########
@@ -84,8 +84,26 @@ impl RecordDecoder {
         }
 
         // Reserve sufficient capacity in offsets
-        self.offsets
-            .resize(self.offsets_len + to_read * self.num_columns, 0);
+        let offsets_capacity = to_read
+            .checked_mul(self.num_columns)

Review Comment:
   Indeed we would have to measure it -- I think the way this PR structures 
things though it will add a bunch more code in the related methods (which may 
be prevent inlining, etc)



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