etseidl commented on code in PR #11419:
URL: https://github.com/apache/arrow-rs/pull/11419#discussion_r4203015663


##########
parquet/src/file/metadata/thrift/mod.rs:
##########
@@ -820,7 +820,10 @@ pub(crate) fn parquet_metadata_from_bytes(
                 let list_ident = prot.read_list_begin()?;
                 // check for list of struct
                 validate_list_type(ElementType::Struct, &list_ident)?;
-                let mut rg_vec = Vec::with_capacity(list_ident.size as usize);
+                let size = list_ident.size as usize;
+                // Validate list size. See 
crate::parquet_thrift::read_thrift_vec

Review Comment:
   ```suggestion
                   // Validate list size.
   ```
   Sorry, out of order suggestions. After the refactor we don't need to refer 
to `read_thrift_vec`.



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