Aaaaaaron commented on a change in pull request #2143:
URL: https://github.com/apache/calcite/pull/2143#discussion_r487622205
##########
File path: core/src/main/java/org/apache/calcite/rel/RelNode.java
##########
@@ -222,6 +223,22 @@
*/
void explain(RelWriter pw);
+ /**
+ * 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 classes implementing this interface
+ * do not override this method.
+ *
+ * @return Relational expression string of this {@code RelNode}
+ */
+ default String explain() {
+ return RelOptUtil.toString(this);
Review comment:
RelOptUtil#dumpPlan can dump other formats like XML/JSON, we don't need
this here.
----------------------------------------------------------------
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]