morrySnow commented on code in PR #14293:
URL: https://github.com/apache/doris/pull/14293#discussion_r1022706432


##########
fe/fe-core/src/test/java/org/apache/doris/nereids/stats/FilterEstimationTest.java:
##########
@@ -71,7 +71,9 @@ public void test1() {
         FilterEstimation filterEstimation = new FilterEstimation(stat);
         StatsDeriveResult expected = filterEstimation.estimate(or);
         Assertions.assertTrue(
-                Precision.equals((0.5 * 0.1 + 0.1 - 0.5 * 0.1 * 0.1) * 1000, 
expected.getRowCount(), 0.01));
+                Precision.equals((0.5 * 0.1 + 
FilterEstimation.DEFAULT_EQUALITY_COMPARISON_SELECTIVITY

Review Comment:
   plz add comment to explain these magic numbers



##########
fe/fe-core/src/test/java/org/apache/doris/nereids/stats/FilterEstimationTest.java:
##########
@@ -324,4 +326,172 @@ public void test11() {
         StatsDeriveResult estimated = filterEstimation.estimate(not);
         Assertions.assertEquals(1000 * 7.0 / 10.0, estimated.getRowCount());
     }
+
+    //c>100
+    // a is primary-key, a.ndv is reduced
+    // b is normal, b.ndv is not changed
+    // c.selectivity is still 1, but its range becomes half
+    @Test
+    public void test12() {

Review Comment:
   need a meaningful name for each test



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to