mzabaluev commented on code in PR #9720:
URL: https://github.com/apache/arrow-rs/pull/9720#discussion_r3094742540


##########
parquet/src/encodings/encoding/dict_encoder.rs:
##########
@@ -183,6 +183,6 @@ impl<T: DataType> Encoder<T> for DictEncoder<T> {
     ///
     /// For this encoder, the indices are unencoded bytes (refer to 
[`Self::write_indices`]).
     fn estimated_memory_size(&self) -> usize {
-        self.interner.storage().size_in_bytes + self.indices.len() * 
std::mem::size_of::<usize>()
+        self.interner.estimated_memory_size() + self.indices.len() * 
std::mem::size_of::<usize>()

Review Comment:
   Testing upper bounds would require intimate knowledge of reallocation 
behavior of `Vec` and hashbrown, but I'll try to get some confirmation.



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