You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/11/15 12:01:02 UTC

[GitHub] [doris] englefly opened a new pull request, #14293: [fix](nereids) add filter estimation ut

englefly opened a new pull request, #14293:
URL: https://github.com/apache/doris/pull/14293

   # Proposed changes
   fix a bug for filter estimation, in pattern of A>10 and A<20.
   
   Issue Number: close #xxx
   
   ## Problem summary
   
   Describe your changes.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: 
       - [ ] Yes
       - [ ] No
       - [ ] I don't know
   2. Has unit tests been added:
       - [ ] Yes
       - [ ] No
       - [ ] No Need
   3. Has document been added or modified:
       - [ ] Yes
       - [ ] No
       - [ ] No Need
   4. Does it need to update dependencies:
       - [ ] Yes
       - [ ] No
   5. Are there any changes that cannot be rolled back:
       - [ ] Yes (If Yes, please explain WHY)
       - [ ] No
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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-unsubscribe@doris.apache.org

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


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


[GitHub] [doris] morrySnow commented on a diff in pull request #14293: [fix](nereids) add filter estimation ut

Posted by GitBox <gi...@apache.org>.
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-unsubscribe@doris.apache.org

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


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


[GitHub] [doris] github-actions[bot] commented on pull request #14293: [fix](nereids) add filter estimation ut

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #14293:
URL: https://github.com/apache/doris/pull/14293#issuecomment-1317984205

   PR approved by anyone and no changes requested.


-- 
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-unsubscribe@doris.apache.org

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


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


[GitHub] [doris] morrySnow merged pull request #14293: [test](nereids) add filter estimation ut cases

Posted by GitBox <gi...@apache.org>.
morrySnow merged PR #14293:
URL: https://github.com/apache/doris/pull/14293


-- 
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-unsubscribe@doris.apache.org

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


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


[GitHub] [doris] github-actions[bot] commented on pull request #14293: [fix](nereids) add filter estimation ut

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #14293:
URL: https://github.com/apache/doris/pull/14293#issuecomment-1317984184

   PR approved by at least one committer and no changes requested.


-- 
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-unsubscribe@doris.apache.org

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


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


[GitHub] [doris] englefly commented on a diff in pull request #14293: [fix](nereids) add filter estimation ut

Posted by GitBox <gi...@apache.org>.
englefly commented on code in PR #14293:
URL: https://github.com/apache/doris/pull/14293#discussion_r1023475786


##########
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:
   done



##########
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:
   done



-- 
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-unsubscribe@doris.apache.org

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


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


[GitHub] [doris] hello-stephen commented on pull request #14293: [fix](nereids) add filter estimation ut

Posted by GitBox <gi...@apache.org>.
hello-stephen commented on PR #14293:
URL: https://github.com/apache/doris/pull/14293#issuecomment-1315274561

   TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 34.58 seconds
    load time: 443 seconds
    storage size: 17149814613 Bytes
    https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221115125807_clickbench_pr_46529.html


-- 
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-unsubscribe@doris.apache.org

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


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