diff --git a/src/sql/optimizer/ob_opt_est_sel.cpp b/src/sql/optimizer/ob_opt_est_sel.cpp index 38152dc90be2fc0f174ad88bff54b66a71ddae4f..84cd36f4f74fcecf2008b266b0c97a21450f7258 100644 --- a/src/sql/optimizer/ob_opt_est_sel.cpp +++ b/src/sql/optimizer/ob_opt_est_sel.cpp @@ -34,9 +34,11 @@ using namespace oceanbase::common; using namespace oceanbase::share::schema; namespace oceanbase { namespace sql { -double ObOptEstSel::DEFAULT_COLUMN_DISTINCT_RATIO = EST_DEF_COL_NUM_DISTINCT * 1.0 / OB_EST_DEFAULT_ROW_COUNT; + constexpr double EPSILON = 0.000000001; +double ObOptEstSel::DEFAULT_COLUMN_DISTINCT_RATIO = EST_DEF_COL_NUM_DISTINCT * 1.0 / OB_EST_DEFAULT_ROW_COUNT; + int ObOptEstSel::calculate_selectivity(const ObEstSelInfo& est_sel_info, const ObIArray& quals, double& selectivity, ObIArray* all_predicate_sel, ObJoinType join_type, const ObRelIds* left_rel_ids, const ObRelIds* right_rel_ids, const double left_row_count, const double right_row_count)