Marcel Kornacker has posted comments on this change.

Change subject: IMPALA-2805: Order conjuncts based on selectivity and cost
......................................................................


Patch Set 13:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/2598/13/fe/src/main/java/com/cloudera/impala/planner/PlanNode.java
File fe/src/main/java/com/cloudera/impala/planner/PlanNode.java:

Line 657:       double backoff_exp = 1.0 / (double) (sortedConjuncts.size() + 
1);
> backoffExponent
i think you need the backoff, because in the cost calculation you estimate how 
much you'd gain by applying the predicate now rather than later. and the value 
of 'later' really depends on the position in the predicate list. in other 
words, in a list with 10 predicates, a really expensive predicate with decent 
selectivity might be the preferred choice at position 5 when looking at 
selectivities as is, but with backoff we'd realize that by position 5 the 
effective reduction in the number of rows is so low that it should really go to 
the end.


Line 663:           sel = Math.pow(Expr.DEFAULT_SELECTIVITY, backoff_exp);
hm, we're now applying the default selectivity multiple times and independently 
again. if you can't think of an immediate good solution, let's leave a todo.


-- 
To view, visit http://gerrit.cloudera.org:8080/2598
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I02279a26fbc6308ac5eb819d78345fc010469034
Gerrit-PatchSet: 13
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Thomas Tauber-Marshall <[email protected]>
Gerrit-Reviewer: Alex Behm <[email protected]>
Gerrit-Reviewer: Henry Robinson <[email protected]>
Gerrit-Reviewer: Marcel Kornacker <[email protected]>
Gerrit-Reviewer: Matthew Jacobs <[email protected]>
Gerrit-Reviewer: Mostafa Mokhtar <[email protected]>
Gerrit-Reviewer: Thomas Tauber-Marshall <[email protected]>
Gerrit-HasComments: Yes

Reply via email to