[CALCITE-3458] Remove desc in AbstractRelNode#1546
Closed
hsyuan wants to merge 3 commits intoapache:masterfrom
hsyuan:CALCITE-3458
Closed
[CALCITE-3458] Remove desc in AbstractRelNode#1546hsyuan wants to merge 3 commits intoapache:masterfrom hsyuan:CALCITE-3458
hsyuan wants to merge 3 commits intoapache:masterfrom
hsyuan:CALCITE-3458
Conversation
xndai
reviewed
Oct 30, 2019
| return desc; | ||
| StringBuilder sb = new StringBuilder("rel#"); | ||
| sb = sb.append(id).append(':').append(digest); | ||
| return sb.toString(); |
Contributor
There was a problem hiding this comment.
If this is called before recomputeDigest(), we will get a different description string than the original implementation. Is that you want?
Contributor
There was a problem hiding this comment.
I'm wondering if we can add a benchmark test for the toString with/without the fix.
If the query is super large, e.g. contains tens of thousands of nodes or expressions, the RelNode digest and desc become very large. The content of desc and digest are almost the same, except that desc consists of id plus digest. So remove desc, just use id + digest to produce description.
danny0405
reviewed
Oct 31, 2019
| // Same with {@link rel#getDescription()}, we don't call it explicitly | ||
| // in order to avoid string copy when generating description. | ||
| buf.append("rel#").append(rels[i].getId()) | ||
| .append(':').append(rels[i].getDigest()); |
Contributor
There was a problem hiding this comment.
Can we abstract this description as a tool method and reuse that ? Something like RelOptUtil#generatesDescription(StringBuilder builder, int relNodeID, String digest)
Member
Author
There was a problem hiding this comment.
Sounds good. I have addressed your comments.
Contributor
|
LGTM |
XuQianJin-Stars
pushed a commit
to XuQianJin-Stars/calcite
that referenced
this pull request
Nov 17, 2019
If the query is super large, e.g. contains tens of thousands of nodes or expressions, the RelNode digest and desc become very large. The content of desc and digest are almost the same, except that desc consists of id plus digest. So remove desc, just use id + digest to produce description. Also deprecated method rel.getDescription(), use rel.toString() instead. Close apache#1546
XuQianJin-Stars
pushed a commit
to XuQianJin-Stars/calcite
that referenced
this pull request
Nov 20, 2019
If the query is super large, e.g. contains tens of thousands of nodes or expressions, the RelNode digest and desc become very large. The content of desc and digest are almost the same, except that desc consists of id plus digest. So remove desc, just use id + digest to produce description. Also deprecated method rel.getDescription(), use rel.toString() instead. Close apache#1546
XuQianJin-Stars
pushed a commit
to XuQianJin-Stars/calcite
that referenced
this pull request
Nov 20, 2019
If the query is super large, e.g. contains tens of thousands of nodes or expressions, the RelNode digest and desc become very large. The content of desc and digest are almost the same, except that desc consists of id plus digest. So remove desc, just use id + digest to produce description. Also deprecated method rel.getDescription(), use rel.toString() instead. Close apache#1546
wangxlong
pushed a commit
to wangxlong/calcite
that referenced
this pull request
Feb 13, 2020
If the query is super large, e.g. contains tens of thousands of nodes or expressions, the RelNode digest and desc become very large. The content of desc and digest are almost the same, except that desc consists of id plus digest. So remove desc, just use id + digest to produce description. Also deprecated method rel.getDescription(), use rel.toString() instead. Close apache#1546
jamesstarr
pushed a commit
to jamesstarr/calcite
that referenced
this pull request
Aug 28, 2025
If the query is super large, e.g. contains tens of thousands of nodes or expressions, the RelNode digest and desc become very large. The content of desc and digest are almost the same, except that desc consists of id plus digest. So remove desc, just use id + digest to produce description. Also deprecated method rel.getDescription(), use rel.toString() instead. Close apache#1546 Change-Id: Ia8fc6a9de3deab2a23672763ccba66b3609cc23c
jamesstarr
pushed a commit
to jamesstarr/calcite
that referenced
this pull request
Mar 16, 2026
If the query is super large, e.g. contains tens of thousands of nodes or expressions, the RelNode digest and desc become very large. The content of desc and digest are almost the same, except that desc consists of id plus digest. So remove desc, just use id + digest to produce description. Also deprecated method rel.getDescription(), use rel.toString() instead. Close apache#1546 Change-Id: Ia8fc6a9de3deab2a23672763ccba66b3609cc23c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If the query is super large, e.g. contains tens of thousands of nodes or
expressions, the RelNode digest and desc become very large. The content of desc
and digest are almost the same, except that desc consists of id plus digest. So
remove desc, just use id + digest to produce description.
https://issues.apache.org/jira/browse/CALCITE-3458