Code review comment: Don't use magic number in codes ,please define 0.9 as a constant

Code under review:
private static Statistics estimateInnerJoin(Statistics leftStats, Statistics rightStats, Join join) {
        List<Double> unTrustEqualRatio = Lists.newArrayList();
        boolean leftBigger = leftStats.getRowCount() > rightStats.getRowCount();
        List<EqualTo> trustableConditions = join.getHashJoinConjuncts().stream()
                .map(expression -> (EqualTo) expression)
                .filter(
                    expression -> {
                        EqualTo equal = normalizeHashJoinCondition(expression, leftStats, rightStats);
                        ColumnStatistic eqLeftColStats = ExpressionEstimation.estimate(equal.left(), leftStats);
                        ColumnStatistic eqRightColStats = ExpressionEstimation.estimate(equal.right(), rightStats);
                        boolean trustable = eqRightColStats.ndv / rightStats.getRowCount() > 0.9
                                || eqLeftColStats.ndv / leftStats.getRowCount() > 0.9;
                        if (!trustable) {
                            if (leftBigger) {
                                unTrustEqualRatio.add((rightStats.getRowCount() / eqRightColStats.ndv)
                                        * Math.min(eqLeftColStats.ndv, eqRightColStats.ndv) / eqLeftColStats.ndv);
                            } else {
                                unTrustEqualRatio.add((leftStats.getRowCount() / eqLeftColStats.ndv)
                                        * Math.min(eqLeftColStats.ndv, eqRightColStats.ndv) / eqRightColStats.ndv);
                            }
                        }
                        return trustable;
                    }
                ).collect(Collectors.toList());

        Statistics innerJoinStats;
        Statistics crossJoinStats = new StatisticsBuilder()
                .setRowCount(leftStats.getRowCount() * rightStats.getRowCount())
                .putColumnStatistics(leftStats.columnStatistics())
                .putColumnStatistics(rightStats.columnStatistics())
                .build();
        if (!trustableConditions.isEmpty()) {
            List<Pair<Expression, Double>> sortedJoinConditions = join.getHashJoinConjuncts().stream()
                    .map(expression -> Pair.of(expression, estimateJoinConditionSel(crossJoinStats, expression)))
                    .sorted((a, b) -> {
                        double sub = a.second - b.second;
                        if (sub > 0) {
                            return 1;
                        } else if (sub < 0) {
                            return -1;
                        } else {
                            return 0;
                        }
                    }).collect(Collectors.toList());

            double sel = 1.0;
            for (int i = 0; i < sortedJoinConditions.size(); i++) {
                sel *= Math.pow(sortedJoinConditions.get(i).second, 1 / Math.pow(2, i));
            }
            innerJoinStats = crossJoinStats.updateRowCountOnly(crossJoinStats.getRowCount() * sel);
        } else {
            double outputRowCount = Math.max(leftStats.getRowCount(), rightStats.getRowCount());
            Optional<Double> ratio = unTrustEqualRatio.stream().max(Double::compareTo);
            if (ratio.isPresent()) {
                outputRowCount = outputRowCount * ratio.get();
            }
            innerJoinStats = crossJoinStats.updateRowCountOnly(outputRowCount);
        }

        if (!join.getOtherJoinConjuncts().isEmpty()) {
            FilterEstimation filterEstimation = new FilterEstimation();
            innerJoinStats = filterEstimation.estimate(
                    ExpressionUtils.and(join.getOtherJoinConjuncts()), innerJoinStats);
        }
        innerJoinStats.setWidth(leftStats.getWidth() + rightStats.getWidth());
        innerJoinStats.setPenalty(0);
        return innerJoinStats;
    }

Line commented on: || eqLeftColStats.ndv / leftStats.getRowCount() > 0.9;

Revised code:
private static Statistics estimateInnerJoin(Statistics leftStats, Statistics rightStats, Join join) {
        /*
         * When we estimate filter A=B,
         * if any side of equation, A or B, is almost unique, the confidence level of estimation is high.
         * But is both sides are not unique, the confidence level is very low.
         * The equations, whose confidence level is low, are called unTrustEquation.
         * In order to avoid error propagation, for unTrustEquations, we only use the biggest selectivity.
         */
        List<Double> unTrustEqualRatio = Lists.newArrayList();
        boolean leftBigger = leftStats.getRowCount() > rightStats.getRowCount();
        List<EqualTo> trustableConditions = join.getHashJoinConjuncts().stream()
                .map(expression -> (EqualTo) expression)
                .filter(
                    expression -> {
                        
                        
                        double almostUniqueThreshold = 0.9;
                        EqualTo equal = normalizeHashJoinCondition(expression, leftStats, rightStats);
                        ColumnStatistic eqLeftColStats = ExpressionEstimation.estimate(equal.left(), leftStats);
                        ColumnStatistic eqRightColStats = ExpressionEstimation.estimate(equal.right(), rightStats);
                        boolean trustable = eqRightColStats.ndv / rightStats.getRowCount() > almostUniqueThreshold
                                || eqLeftColStats.ndv / leftStats.getRowCount() > almostUniqueThreshold;
                        if (!trustable) {
                            if (leftBigger) {
                                unTrustEqualRatio.add((rightStats.getRowCount() / eqRightColStats.ndv)
                                        * Math.min(eqLeftColStats.ndv, eqRightColStats.ndv) / eqLeftColStats.ndv);
                            } else {
                                unTrustEqualRatio.add((leftStats.getRowCount() / eqLeftColStats.ndv)
                                        * Math.min(eqLeftColStats.ndv, eqRightColStats.ndv) / eqRightColStats.ndv);
                            }
                        }
                        return trustable;
                    }
                ).collect(Collectors.toList());

        Statistics innerJoinStats;
        Statistics crossJoinStats = new StatisticsBuilder()
                .setRowCount(leftStats.getRowCount() * rightStats.getRowCount())
                .putColumnStatistics(leftStats.columnStatistics())
                .putColumnStatistics(rightStats.columnStatistics())
                .build();
        if (!trustableConditions.isEmpty()) {
            List<Pair<Expression, Double>> sortedJoinConditions = join.getHashJoinConjuncts().stream()
                    .map(expression -> Pair.of(expression, estimateJoinConditionSel(crossJoinStats, expression)))
                    .sorted((a, b) -> {
                        double sub = a.second - b.second;
                        if (sub > 0) {
                            return 1;
                        } else if (sub < 0) {
                            return -1;
                        } else {
                            return 0;
                        }
                    }).collect(Collectors.toList());

            double sel = 1.0;
            for (int i = 0; i < sortedJoinConditions.size(); i++) {
                sel *= Math.pow(sortedJoinConditions.get(i).second, 1 / Math.pow(2, i));
            }
            innerJoinStats = crossJoinStats.updateRowCountOnly(crossJoinStats.getRowCount() * sel);
        } else {
            double outputRowCount = Math.max(leftStats.getRowCount(), rightStats.getRowCount());
            Optional<Double> ratio = unTrustEqualRatio.stream().max(Double::compareTo);
            if (ratio.isPresent()) {
                outputRowCount = outputRowCount * ratio.get();
            }
            innerJoinStats = crossJoinStats.updateRowCountOnly(outputRowCount);
        }

        if (!join.getOtherJoinConjuncts().isEmpty()) {
            FilterEstimation filterEstimation = new FilterEstimation();
            innerJoinStats = filterEstimation.estimate(
                    ExpressionUtils.and(join.getOtherJoinConjuncts()), innerJoinStats);
        }
        innerJoinStats.setWidth(leftStats.getWidth() + rightStats.getWidth());
        innerJoinStats.setPenalty(0);
        return innerJoinStats;
    }