Skip to content

Commit

Permalink
add and fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-toth committed Oct 25, 2024
1 parent 66fdd18 commit f1917fa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions datafusion/physical-expr-common/src/physical_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ pub trait PhysicalExpr: Send + Sync + Display + Debug + DynEq + DynHash {
}
}

/// [`PhysicalExpr`] can't be constrained by [`Eq`] directly because it must remain object
/// safe. To ease implementation blanket implementation is provided for [`Eq`] types.
pub trait DynEq {
fn dyn_eq(&self, other: &dyn Any) -> bool;
}
Expand All @@ -171,8 +173,9 @@ impl PartialEq for dyn PhysicalExpr {

impl Eq for dyn PhysicalExpr {}

/// Note: [`PhysicalExpr`] is not constrained by [`Hash`] directly because it must remain
/// object safe.
/// [`PhysicalExpr`] can't be constrained by [`Hash`] directly because it must remain
/// object safe. To ease implementation blanket implementation is provided for [`Hash`]
/// types.
pub trait DynHash {
fn dyn_hash(&self, _state: &mut dyn Hasher);
}
Expand Down

0 comments on commit f1917fa

Please sign in to comment.