danny0405 commented on a change in pull request #1546: [CALCITE-3458] Remove
desc in AbstractRelNode
URL: https://github.com/apache/calcite/pull/1546#discussion_r340472964
##########
File path: core/src/main/java/org/apache/calcite/rel/AbstractRelNode.java
##########
@@ -363,11 +352,14 @@ public void replaceInput(
}
public String toString() {
- return desc;
+ return getDescription();
}
+ /* Description, consists of id plus digest */
public final String getDescription() {
- return desc;
+ StringBuilder sb = new StringBuilder("rel#");
+ sb = sb.append(id).append(':').append(digest);
+ return sb.toString();
Review comment:
I'm wondering if we can add a benchmark test for the toString with/without
the fix.
----------------------------------------------------------------
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]
With regards,
Apache Git Services