[ 
https://issues.apache.org/jira/browse/IGNITE-15980?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Plekhanov updated IGNITE-15980:
---------------------------------------
    Labels: calcite3-required  (was: calcite2-required calcite3-required)

> Calcite engine. Flaky test SetOpPlannerTest.testSetOpRandom[SetOp = INTERSECT]
> ------------------------------------------------------------------------------
>
>                 Key: IGNITE-15980
>                 URL: https://issues.apache.org/jira/browse/IGNITE-15980
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Aleksey Plekhanov
>            Assignee: Aleksey Plekhanov
>            Priority: Major
>              Labels: calcite3-required
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> After Calcite version update test {{SetOpPlannerTest.testSetOpRandom[SetOp = 
> INTERSECT]}} become flaky:
> {noformat}
> java.lang.AssertionError: Invalid plan (Unexpected node class 
> [node=rel#2245:IgniteSingleIntersect.IGNITE.[].single.one-way.uncorrelated(input#0=IgniteExchange#2243,input#1=IgniteExchange#2244,all=true),
>  cls=IgniteReduceIntersect]):
> IgniteSingleIntersect(all=[true]): rowcount = 200.0, cumulative cost = 
> IgniteCost [rowCount=600.0, cpu=600.0, memory=2000.0, io=0.0, 
> network=2400.0], id = 2245
>   IgniteExchange(distribution=[single]): rowcount = 100.0, cumulative cost = 
> IgniteCost [rowCount=200.0, cpu=200.0, memory=0.0, io=0.0, network=1200.0], 
> id = 2243
>     IgniteTableScan(table=[[PUBLIC, RANDOM_TBL1]], requiredColumns=[{0, 1, 
> 2}]): rowcount = 100.0, cumulative cost = IgniteCost [rowCount=100.0, 
> cpu=100.0, memory=0.0, io=0.0, network=0.0], id = 2210
>   IgniteExchange(distribution=[single]): rowcount = 100.0, cumulative cost = 
> IgniteCost [rowCount=200.0, cpu=200.0, memory=0.0, io=0.0, network=1200.0], 
> id = 2244
>     IgniteTableScan(table=[[PUBLIC, RANDOM_TBL2]], requiredColumns=[{0, 1, 
> 2}]): rowcount = 100.0, cumulative cost = IgniteCost [rowCount=100.0, 
> cpu=100.0, memory=0.0, io=0.0, network=0.0], id = 2213
> {noformat}
> The root cause: There are two methods {{getRowCount}} in {{IgniteMdRowCount}} 
> which fits {{IgniteMapIntersect}} relational operator as parameter (one 
> accepting {{IgniteSetOp}}, and another from super class accepting 
> {{Intersect}}). Runtime code-generator choose random of these methods. In 
> last Calcite version row count calculation algorithm of method 
> {{getRowCount(Intersect)}} was changed, and if this method is choosen by 
> runtime code generator, there is incorrect cost and planner builds incorrect 
> plan. In debug mode always correct method ({{getRowCount(IgniteSetOp)}}) is 
> choosen.  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to