calcite icon indicating copy to clipboard operation
calcite copied to clipboard

[CALCITE-5260] Pop the last RelNode added into the bindings list when failing to apply a rule

Open wangyeweikuer opened this issue 3 years ago • 1 comments

When fail to match a subtree, HepPlanner should pop the last RelNode added into the bindings list, where the nodes left are 'real' matched when applying a rule.

Otherwise, using some temporary and unnecessary nodes to construct a HepRuleCall will cause an assertion error.

wangyeweikuer avatar Sep 02 '22 08:09 wangyeweikuer

@wangyeweikuer Thanks for your contribution, could you add some tests which will fail without your fix? This will make us easier to understand the PR.

libenchao avatar Sep 04 '22 07:09 libenchao