[CALCITE-4129] Support deep equality check for RelNode#2074
Closed
hsyuan wants to merge 2 commits intoapache:masterfrom
hsyuan:digest
Closed
[CALCITE-4129] Support deep equality check for RelNode#2074hsyuan wants to merge 2 commits intoapache:masterfrom hsyuan:digest
hsyuan wants to merge 2 commits intoapache:masterfrom
hsyuan:digest
Conversation
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.
Currently the only way to check rel node tree deep equality is transforming
into String by RelOptUtil.toString(rel) with
SqlExplainLevel.EXPPLAN_ATTRIBUTES, which is inefficient. One example is
RexSubQuery. It has to do it this way, because the rel being reference by
RexSubQuery is possibly not yet registered to VolcanoPlanner, and the digest
equals checks the input RelNode by identity (not content). That is OK for
RelSubset and HepRelVertex, if the RelNode is already registered in planner,
but not for plain RelNode that is outside of planner. Due to this, we have to
implement another set of deep equals logic in our system.
With this patch,
digestEquals()anddigestHash()are extended to supportdeep equality check for RelNode.
CALCITE-4129