You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2019/04/30 16:15:21 UTC

[GitHub] [drill] amansinha100 commented on a change in pull request #1772: DRILL-7187: Improve selectivity estimation of BETWEEN predicates and …

amansinha100 commented on a change in pull request #1772: DRILL-7187: Improve selectivity estimation of BETWEEN predicates and …
URL: https://github.com/apache/drill/pull/1772#discussion_r279828965
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/planner/cost/DrillRelMdSelectivity.java
 ##########
 @@ -356,8 +426,8 @@ private boolean isMultiColumnPredicate(final RexNode node) {
     return findAllRexInputRefs(node).size() > 1;
   }
 
-  private static List<RexInputRef> findAllRexInputRefs(final RexNode node) {
-      List<RexInputRef> rexRefs = new ArrayList<>();
+  private static Set<RexInputRef> findAllRexInputRefs(final RexNode node) {
 
 Review comment:
   Yes, thanks for pointing that out, even though that predicate $0=$0 is unexpected (something to investigate in future).  I have reverted this change and it returns a List as before.  Instead, now where the original call to `isMultiColumnPredicate()` happens I added a second condition (line 182) that ensures that conditions of type `$1 > 10 AND $1 < 20` which are created after calling `preProcessRangeConditions()` are not considered the same as multicolumn predicates.  

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services