findepi commented on code in PR #17067: URL: https://github.com/apache/datafusion/pull/17067#discussion_r2261960564
########## datafusion/ffi/src/udaf/mod.rs: ########## @@ -384,6 +385,19 @@ pub struct ForeignAggregateUDF { unsafe impl Send for ForeignAggregateUDF {} unsafe impl Sync for ForeignAggregateUDF {} +impl PartialEq for ForeignAggregateUDF { + fn eq(&self, other: &Self) -> bool { + // FFI_AggregateUDF cannot be compared, so identity equality is the best we can do. + std::ptr::eq(self, other) + } +} +impl Eq for ForeignAggregateUDF {} +impl Hash for ForeignAggregateUDF { + fn hash<H: Hasher>(&self, state: &mut H) { + std::ptr::hash(self, state) + } +} + Review Comment: It definitely makes sense to me, but I am not well-equipped to address that. Thanks for offering to improve that as a follow-on. -- 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-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org