korlov42 commented on a change in pull request #8544:
URL: https://github.com/apache/ignite/pull/8544#discussion_r543200770



##########
File path: 
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/rel/AbstractIgniteNestedLoopJoin.java
##########
@@ -391,11 +322,17 @@ else if (joinType == RIGHT || joinType == 
JoinRelType.FULL) {
         if (Double.isInfinite(rightRowCount))
             rowCount = rightRowCount;
 
+        if (!Double.isInfinite(leftRowCount) && 
!Double.isInfinite(rightRowCount) && leftRowCount > rightRowCount)
+            rowCount = RelMdUtil.addEpsilon(rowCount);
+
         RelDistribution.Type type = distribution().getType();
 
-        if (type == BROADCAST_DISTRIBUTED || type == SINGLETON)
+        if (type == SINGLETON)
             rowCount = RelMdUtil.addEpsilon(rowCount);
 
+        if (type == BROADCAST_DISTRIBUTED)
+            rowCount = RelMdUtil.addEpsilon(RelMdUtil.addEpsilon(rowCount));

Review comment:
       broadcast distribution should be more expensive since it duplicates the 
row for every node




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to