jayshrivastava commented on code in PR #20416:
URL: https://github.com/apache/datafusion/pull/20416#discussion_r2842625397
##########
datafusion/proto/src/physical_plan/mod.rs:
##########
@@ -3818,6 +3822,18 @@ impl DeduplicatingSerializer {
session_id: rand::random(),
}
}
+
+ fn hash(&self, ptr: u64) -> u64 {
+ // Hash session_id, pointer address, and process ID together to create
expr_id.
+ // - session_id: random per serializer, prevents collisions when
merging serializations
+ // - ptr: unique address per Arc within a process
+ // - pid: prevents collisions if serializer is shared across processes
+ let mut hasher = DefaultHasher::new();
+ self.session_id.hash(&mut hasher);
+ ptr.hash(&mut hasher);
+ std::process::id().hash(&mut hasher);
+ hasher.finish()
+ }
}
impl PhysicalProtoConverterExtension for DeduplicatingSerializer {
Review Comment:
I suspect it may have been working because we were serializing the snapshot
of the dynamic filter instead of the `DynamicFilterPhysicalExpr`. I don't think
that's what we want. After changing that behavior to serialize/deserialize the
`DynamicFilterPhysicalExpr`, then the `DeduplicatingSerializer` only dedupes
the outer arc and not the inner.
I did an investigation
[here](https://github.com/datafusion-contrib/datafusion-distributed/issues/180#issuecomment-3902482676)
with more details.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]