hsyuan commented on a change in pull request #2074:
URL: https://github.com/apache/calcite/pull/2074#discussion_r457007569
##########
File path: core/src/main/java/org/apache/calcite/rel/RelNode.java
##########
@@ -335,6 +335,26 @@ default String getDigest() {
@API(since = "1.24", status = API.Status.INTERNAL)
void recomputeDigest();
+ /**
+ * Equality check for RelNode digest.
+ *
+ * <p>By default this method collects digest attributes from
+ * explain terms, then compares each attribute pair.</p>
+ *
+ * @return Whether the 2 RelNodes are equivalent or have the same digest.
+ * @see #digestHash()
+ */
+ @API(since = "1.25", status = API.Status.EXPERIMENTAL)
+ boolean digestEquals(Object obj);
+
+ /**
+ * Compute hash code for RelNode digest.
+ *
+ * @see #digestEquals(Object)
+ */
+ @API(since = "1.25", status = API.Status.EXPERIMENTAL)
+ int digestHash();
Review comment:
I don't think so. It should be originally part of RelNode, and actually
should replace hashCode() (if it isn't final), IMO.
----------------------------------------------------------------
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]