peter-toth commented on code in PR #10473:
URL: https://github.com/apache/datafusion/pull/10473#discussion_r1604616059
##########
datafusion/expr/src/expr.rs:
##########
@@ -1389,6 +1390,201 @@ impl Expr {
| Expr::Placeholder(..) => false,
}
}
+
+ pub fn hash_node(&self, hasher: &mut AHasher) {
Review Comment:
I'm not familiar with `std::mem::discriminant` but according to its docs it
doesn't seem to take into account the data that an enum carries. But we need to
take the enum's data into account (except for the subexpressions) to avoid hash
collisions as much as we can.
E.g. in the case of `Expr::BinaryExpr` we want to take into account the
operator, but we don't want to take into account the left and right
subexpressions as the identifier of those subexpressions are be calculated
separately and those identifiers contribute to their parent's identifier when
we build the parent's id in CSE.
--
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]