rubenada commented on a change in pull request #2143:
URL: https://github.com/apache/calcite/pull/2143#discussion_r486848210



##########
File path: core/src/main/java/org/apache/calcite/rel/RelNode.java
##########
@@ -232,6 +233,21 @@
    */
   RelNode onRegister(RelOptPlanner planner);
 
+  /**
+   * Returns a relational expression string of this {@code RelNode}.
+   * The string returned is the same as
+   * {@link RelOptUtil#toString(org.apache.calcite.rel.RelNode)}.
+   *
+   * This method is intended mainly for use while debugging in an IDE,
+   * as a convenient short-hand for RelOptUtil.toString.
+   * We recommend that sub-classes do not override this method.
+   *
+   * @return Relational expression string of this {@code RelNode}
+   */
+  default String explain() {

Review comment:
       nitpicking: I think this new method should go together (e.g. right 
after) with `void explain(RelWriter pw);`
   Also, since `RelNode` is an interface (and not an abstract class), IMHO 
javadoc should not say "sub-classes", but instead something along the lines: 
"We recommend that classes implementing this interface do not override this 
method"




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to