Paul Rogers has posted comments on this change. ( http://gerrit.cloudera.org:8080/12427 )
Change subject: IMPALA-7560: Improve selectivity estimate for != ...................................................................... Patch Set 3: (3 comments) Addressed review comments. http://gerrit.cloudera.org:8080/#/c/12427/2//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/12427/2//COMMIT_MSG@7 PS2, Line 7: IMPALA-7560 > IMPALA-7560 is another jira for this. Thanks. marked IMPALA-8039 as a duplicate and changed title to IMPALA-7560. http://gerrit.cloudera.org:8080/#/c/12427/2/fe/src/main/java/org/apache/impala/analysis/BinaryPredicate.java File fe/src/main/java/org/apache/impala/analysis/BinaryPredicate.java: http://gerrit.cloudera.org:8080/#/c/12427/2/fe/src/main/java/org/apache/impala/analysis/BinaryPredicate.java@219 PS2, Line 219: se NULL_MATCHING_EQ: // TODO : if (singleCol && distinctValues > 0) { : > I think these else branches are also taken for complex predicates (since di Fixed. Computing col1 = col2 is possible, but should be done as a separate patch. http://gerrit.cloudera.org:8080/#/c/12427/2/testdata/workloads/functional-planner/queries/PlannerTest/tpch-kudu.test File testdata/workloads/functional-planner/queries/PlannerTest/tpch-kudu.test: http://gerrit.cloudera.org:8080/#/c/12427/2/testdata/workloads/functional-planner/queries/PlannerTest/tpch-kudu.test@1178 PS2, Line 1178: NOT p_type LIKE 'MEDIUM POLISHED%', p_brand != 'Brand#45' > Should we use consistent ordering (sort?) Looks like PlanNode.orderConjunctsByCost() sorts by some combination of selectivity and estimated eval cost. Since we changed the selectivity of != this seems to have changed the eval order. The list here presents predicates in eval order, so it changed also. The sort code seems to be observing that we'd like to evaluate the most expensive predicates last, and the least selective ones last. It tries to combine these factors to create a combined ordering. -- To view, visit http://gerrit.cloudera.org:8080/12427 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I8f6013c9ef95a89d55d8b25f0b5433c81582a62f Gerrit-Change-Number: 12427 Gerrit-PatchSet: 3 Gerrit-Owner: Paul Rogers <prog...@cloudera.com> Gerrit-Reviewer: Bharath Vissapragada <bhara...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Paul Rogers <prog...@cloudera.com> Gerrit-Comment-Date: Thu, 14 Feb 2019 04:09:57 +0000 Gerrit-HasComments: Yes