liyafan82 commented on a change in pull request #2074:
URL: https://github.com/apache/calcite/pull/2074#discussion_r457006511



##########
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:
       Does it make the code clearer by extracting the two methods to a 
separate interface, as the RelNode interface is already large enough?




----------------------------------------------------------------
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]


Reply via email to