You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "mzabaluev (via GitHub)" <gi...@apache.org> on 2026/04/16 17:56:17 UTC
Re: [PR] fix: correct accounting in `DictEncoder::estimated_memory_size`, `Interner::estimated_memory_size` [arrow-rs]
mzabaluev commented on code in PR #9720:
URL: https://github.com/apache/arrow-rs/pull/9720#discussion_r3095138581
##########
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:
I have accounted for the byte arrays' allocations and added some tests.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org