okumin commented on code in PR #6505:
URL: https://github.com/apache/hive/pull/6505#discussion_r4719207985


##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/stats/FilterSelectivityEstimator.java:
##########
@@ -74,6 +74,7 @@ public class FilterSelectivityEstimator extends 
RexVisitorImpl<Double> {
   private final double  childCardinality;
   private final RelMetadataQuery mq;
   private final RexBuilder rexBuilder;
+  private boolean unknownSeen;

Review Comment:
   If it is already clear that only ANTI JOIN is a special case, we can add a 
new flag for the second mode to ensure referential transparency.
   
   ```
     private Double computeConjunctionSelectivity(RexCall call) {
       Double tmpSelectivity;
       double selectivity = 1;
   
       for (RexNode cje : call.getOperands()) {
         tmpSelectivity = cje.accept(this);
         if (tmpSelectivity != null) {
           selectivity *= tmpSelectivity;
         } else if (newFlag) {
           return null;
         }
       }
   
       return selectivity;
     }
   ```



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to