Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions datafusion/expr/src/ptr_eq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ pub fn arc_ptr_hash<T: ?Sized>(a: &Arc<T>, hasher: &mut impl Hasher) {

/// A wrapper around a pointer that implements `Eq` and `Hash` comparing
/// the underlying pointer address.
///
/// If you have pointers to a `dyn UDF impl` consider using [`super::udf_eq::UdfEq`].
#[derive(Clone)]
#[allow(private_bounds)] // This is so that PtrEq can only be used with allowed pointer types (e.g. Arc), without allowing misuse.
pub struct PtrEq<Ptr: PointerType>(Ptr);
Expand Down
2 changes: 2 additions & 0 deletions datafusion/expr/src/udf_eq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ use std::sync::Arc;

/// A wrapper around a pointer to UDF that implements `Eq` and `Hash` delegating to
/// corresponding methods on the UDF trait.
///
/// If you want to just compare pointers for equality, use [`super::ptr_eq::PtrEq`].
#[derive(Clone)]
#[allow(private_bounds)] // This is so that UdfEq can only be used with allowed pointer types (e.g. Arc), without allowing misuse.
pub struct UdfEq<Ptr: UdfPointer>(Ptr);
Expand Down