zstan commented on code in PR #13389:
URL: https://github.com/apache/ignite/pull/13389#discussion_r3819077060


##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/planner/PlanSplitterTest.java:
##########
@@ -159,10 +161,15 @@ public void testSplitterPartiallyColocated1() throws 
Exception {
             "ON d.projectId = p.id0 " +
             "WHERE (d.projectId + 1) = ?";
 
-        // First table is replicated and planned with TrimExchange to colocate 
data, but set of nodes for partitioned
-        // table is differ, so exchange is added after fragments split for 
colocation. Another exchange is added after
-        // fragments split to send data to initiator node.
-        assertPlan(sql, schema, 
hasFragmentsCount(3).and(hasChildThat(isInstanceOf(IgniteTrimExchange.class))));
+        // First table is replicated and planned with Exchange to colocate 
data, but set of nodes for partitioned
+        // table is differ, so exchange is added after fragments split for 
colocation.
+        assertPlan(sql, schema, hasFragmentsCount(3)

Review Comment:
   Current plan:
   ```
   IgniteMergeJoin(condition=[=($0, $3)], joinType=[inner]): rowcount = 
5.625E9, cumulative cost = IgniteCost [rowCount=5.627075E9, 
cpu=2.2525784224829422E10, memory=4900000.0, io=0.0, network=4000000.0]
     IgniteSort(sort0=[$0], dir0=[ASC]): rowcount = 75000.0, cumulative cost = 
IgniteCost [rowCount=575000.0, cpu=4600679.76331665, memory=900000.0, io=0.0, 
network=0.0]
       IgniteTableScan(table=[[PUBLIC, DEVELOPER]], filters=[=(+($t2, 1), 
?0)]): rowcount = 75000.0, cumulative cost = IgniteCost [rowCount=500000.0, 
cpu=2000000.0, memory=0.0, io=0.0, network=0.0]
     IgniteExchange(distribution=[single]): rowcount = 500000.0, cumulative 
cost = IgniteCost [rowCount=1500000.0, cpu=2.118354506610649E7, 
memory=4000000.0, io=0.0, network=4000000.0]
       IgniteSort(sort0=[$0], dir0=[ASC]): rowcount = 500000.0, cumulative cost 
= IgniteCost [rowCount=1000000.0, cpu=2.068354506610649E7, memory=4000000.0, 
io=0.0, network=0.0]
         IgniteTableScan(table=[[PUBLIC, PROJECT]], requiredColumns=[{0, 2}]): 
rowcount = 500000.0, cumulative cost = IgniteCost [rowCount=500000.0, 
cpu=500000.0, memory=0.0, io=0.0, network=0.0]
   ```
   
   master branch plan:
   ```
   IgniteProject(ID=[$2], NAME=[$3], PROJECTID=[$4], ID0=[$0], VER0=[$1]): 
rowcount = 11250.0, cumulative cost = IgniteCost [rowCount=1672500.0, 
cpu=8572500.0, memory=1170000.0, io=0.0, network=225000.0]
     IgniteExchange(distribution=[single]): rowcount = 11250.0, cumulative cost 
= IgniteCost [rowCount=1661250.0, cpu=8561250.0, memory=1170000.0, io=0.0, 
network=225000.0]
       IgniteHashJoin(condition=[=($2, $0)], joinType=[inner]): rowcount = 
11250.0, cumulative cost = IgniteCost [rowCount=1650000.0, cpu=8550000.0, 
memory=1170000.0, io=0.0, network=0.0]
         IgniteTableScan(table=[[PUBLIC, PROJECT]], requiredColumns=[{0, 2}]): 
rowcount = 500000.0, cumulative cost = IgniteCost [rowCount=500000.0, 
cpu=500000.0, memory=0.0, io=0.0, network=0.0]
         IgniteTrimExchange(distribution=[affinity[identity=hash, 
cacheId=1355342585][0]]): rowcount = 75000.0, cumulative cost = IgniteCost 
[rowCount=575000.0, cpu=2300000.0, memory=0.0, io=0.0, network=0.0]
           IgniteTableScan(table=[[PUBLIC, DEVELOPER]], filters=[=(+($t2, 1), 
?0)]): rowcount = 75000.0, cumulative cost = IgniteCost [rowCount=500000.0, 
cpu=2000000.0, memory=0.0, io=0.0, network=0.0]
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to