[ 
https://issues.apache.org/jira/browse/CALCITE-3118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16857997#comment-16857997
 ] 

Botong Huang edited comment on CALCITE-3118 at 6/6/19 7:08 PM:
---------------------------------------------------------------

Thanks [~vladimirsitnikov] for reviewing. The real check in the unit test is 
the assert inside TwoChildrenSameSetMatchRule. Without the one line fix, this 
assert will fail because it ends up matching the same PhysLeafRel for both 
child operands. I can add some comments in the unit test in needed.


was (Author: botong):
Thanks [~vladimirsitnikov] for reviewing. The real check in the unit test is 
the assert inside TwoChildrenSameSetMatchRule. Without the one line fix, this 
assert will fail because it ends up matching the same PhysLeafRel as both child 
operand. 

> VolcanoRuleCall match parent child ordinal not properly checked
> ---------------------------------------------------------------
>
>                 Key: CALCITE-3118
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3118
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Botong Huang
>            Priority: Major
>              Labels: pull-request-available
>
> In VolcanoRuleCall.matchRecurse(), when ascending (child operand is matched, 
> looking for parent operand match), we want to check that the matched parent 
> indeed has the previously matched child RelNode as a child with the expected 
> ordinal. However, there is a bug in this check. As a result, some incorrect 
> parent is not skipped as expected and matched incorrectly. See unit test 
> included in PR for a case that triggers this bug, where the same RelNode get 
> matched for two operands at the same time. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to