jorgecarleitao commented on a change in pull request #8836:
URL: https://github.com/apache/arrow/pull/8836#discussion_r536973939
##########
File path: rust/datafusion/src/physical_plan/udf.rs
##########
@@ -56,6 +56,12 @@ impl Debug for ScalarUDF {
}
}
+impl PartialEq for ScalarUDF {
+ fn eq(&self, other: &Self) -> bool {
+ self.name == other.name && self.signature == other.signature
Review comment:
I agree that we are performing comparison of expressions, we should have
`partialEq` and not a generic function, as otherwise we may end up with
multiple variations of a `eq`, which is error-prone.
##########
File path: rust/datafusion/src/physical_plan/udf.rs
##########
@@ -56,6 +56,12 @@ impl Debug for ScalarUDF {
}
}
+impl PartialEq for ScalarUDF {
+ fn eq(&self, other: &Self) -> bool {
+ self.name == other.name && self.signature == other.signature
Review comment:
I agree that if we are performing comparison of expressions, we should
have `partialEq` and not a generic function, as otherwise we may end up with
multiple variations of a `eq`, which is error-prone.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]