Steve Carlin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/23930 )

Change subject: IMPALA-14716: Calcite Planner: Make condition estimates more 
similar to original planner
......................................................................


Patch Set 13:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/23930/13/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/FilterSelectivityEstimator.java
File 
java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/FilterSelectivityEstimator.java:

http://gerrit.cloudera.org:8080/#/c/23930/13/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/FilterSelectivityEstimator.java@255
PS13, Line 255:         return Expr.DEFAULT_SELECTIVITY;
> I didn't notice this closely in the first pass but here it is returning the
For better or for worse, this matches Impala's logic here:

https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/analysis/CompoundPredicate.java#L195


http://gerrit.cloudera.org:8080/#/c/23930/13/java/calcite-planner/src/main/java/org/apache/impala/calcite/schema/FilterSelectivityEstimator.java@257
PS13, Line 257:       selectivity = selectivity + tmpSelectivity - selectivity 
* tmpSelectivity;
> Taking a second look at this by going through an example:
Also for better or for worse, this matches Impala's logic:

https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/analysis/CompoundPredicate.java#L204



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3b9a25259916504296dbd9a9cb9466be8fac8718
Gerrit-Change-Number: 23930
Gerrit-PatchSet: 13
Gerrit-Owner: Steve Carlin <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Fang-Yu Rao <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>
Gerrit-Comment-Date: Thu, 02 Apr 2026 13:15:55 +0000
Gerrit-HasComments: Yes

Reply via email to