adamreeve commented on code in PR #8898:
URL: https://github.com/apache/arrow-rs/pull/8898#discussion_r2547782932
##########
parquet/src/encryption/decrypt.rs:
##########
@@ -582,7 +582,7 @@ impl PartialEq for FileDecryptor {
impl HeapSize for FileDecryptor {
fn heap_size(&self) -> usize {
self.decryption_properties.heap_size()
- + (Arc::clone(&self.footer_decryptor) as Arc<dyn
HeapSize>).heap_size()
Review Comment:
This was needed to be able to cast to `Arc<dyn HeapSize>` in order to use
the `impl HeapSize for Arc<dyn HeapSize>`. Otherwise the other implementation
(`impl<T: HeapSize> HeapSize for Arc<T>`) isn't used and the code with your
change just derefs the contents of the `Arc` and calls its `heap_size` method,
and the heap size of the `Arc` (ie. the size of its contents plus its reference
counts) is silently skipped.
--
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]