Skip to content

Commit 8d32a8c

Browse files
authored
Fix PhysicalExpr hash (#381)
1 parent 7a4309e commit 8d32a8c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

datafusion/physical-expr-common/src/physical_expr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ pub trait PhysicalExpr: Send + Sync + Display + Debug + PartialEq<dyn Any> {
185185

186186
impl Hash for dyn PhysicalExpr {
187187
fn hash<H: Hasher>(&self, state: &mut H) {
188+
self.as_any().type_id().hash(state);
188189
self.dyn_hash(state);
189190
}
190191
}

datafusion/physical-expr/src/scalar_function.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ impl PhysicalExpr for ScalarFunctionExpr {
199199
self.name.hash(&mut s);
200200
self.args.hash(&mut s);
201201
self.return_type.hash(&mut s);
202-
// Add `self.fun` when hash is available
202+
self.fun.hash(&mut s)
203203
}
204204

205205
fn get_properties(&self, children: &[ExprProperties]) -> Result<ExprProperties> {

0 commit comments

Comments
 (0)