amansinha100 commented on a change in pull request #1775: DRILL-7227: Fix 
predicate check in DrillRelOptUtil.analyzeSimpleEquiJoin
URL: https://github.com/apache/drill/pull/1775#discussion_r279995806
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/planner/cost/DrillRelMdDistinctRowCount.java
 ##########
 @@ -180,7 +180,7 @@ private Double getDistinctRowCountInternal(TableScan scan, 
RelMetadataQuery mq,
       }
     }
     s = Math.min(s, rowCount);
-    if (!allCols) {
+    if (s == 1.0 && !allColsHaveNDV) {
 
 Review comment:
   Its not clear why the check for `s == 1.0` is needed.  
   Also, I see that the `else` part is returning the selectivity value whereas 
the `if` part is returning a row count.  The method is expected to return a 
rowcount, not selectivity...unless I am missing something. 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to