Skip to content

Commit

Permalink
[CALCITE-4277] When rel has been removed from its subset, skip the or…
Browse files Browse the repository at this point in the history
…igin rule match (Jiatao Tao)
  • Loading branch information
Aaaaaaron authored and chunweilei committed Nov 18, 2020
1 parent 2ddc836 commit 3846b50
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ protected void onMatch() {
return;
}

if (subset.set.equivalentSet != null) {
if ((subset.set.equivalentSet != null)
// When rename RelNode via VolcanoPlanner#rename(RelNode rel),
// we may remove rel from its subset: "subset.set.rels.remove(rel)".
// Skip rule match when the rel has been removed from set.
|| (subset != rel && !subset.getRelList().contains(rel))) {
LOGGER.debug(
"Rule [{}] not fired because operand #{} ({}) belongs to obsolete set",
getRule(), i, rel);
Expand Down

0 comments on commit 3846b50

Please sign in to comment.