adriangb commented on code in PR #20416:
URL: https://github.com/apache/datafusion/pull/20416#discussion_r2842048151


##########
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 thought DeduplicatingSerializer already handled dynamic filters without 
any further work?



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

Reply via email to