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/06/20 12:03:02 UTC

[GitHub] [doris] Gabriel39 opened a new pull request, #10278: [Improvement] reduce olap filters when use in key ranges

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

   # Proposed changes
   
   Issue Number: close #10277
   
   ## Problem Summary:
   
   perf test:
   table: 
   ![image](https://user-images.githubusercontent.com/37700562/174597321-a1040dfa-df57-48d2-9a2e-e58b1e6add77.png)
   
   records: 59986052
   
   before this PR:
   ![aAPSIZ3FgK](https://user-images.githubusercontent.com/37700562/174597430-c71210ab-0caa-4770-9db5-0976fc61c773.jpg)
   after this PR:
   ![jjuin9nN59](https://user-images.githubusercontent.com/37700562/174597499-cbda9bd8-c193-4a6e-829c-3a2e1226c055.jpg)
   
   
   ## 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/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] zenoyang commented on a diff in pull request #10278: [Improvement] remove olap filters when use in key ranges

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


##########
be/src/exec/olap_common.h:
##########
@@ -258,6 +258,9 @@ class OlapScanKeys {
     template <class T>
     Status extend_scan_key(ColumnValueRange<T>& range, int32_t max_scan_key_num);
 
+    template <class T>
+    Status extend_scan_key(ColumnValueRange<T>& range, int32_t max_scan_key_num, bool* exact_value);
+

Review Comment:
   The implementations of `Status extend_scan_key(ColumnValueRange<T>& range, int32_t max_scan_key_num);` and `Status extend_scan_key(ColumnValueRange<T>& range, int32_t max_scan_key_num, bool* exact_value);` are very similar, I think they can be combined into one, just give `exact_value` a default value `nullptr` when the function is declared. Before assigning a value to `*exact_value`, first determine whether `exact_value` is `nullptr`.



-- 
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 #10278: [Improvement] remove olap filters when use in key ranges

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

   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] adonis0147 commented on a diff in pull request #10278: [Improvement] remove olap filters when use in key ranges

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


##########
be/src/exec/olap_common.h:
##########
@@ -856,4 +859,125 @@ Status OlapScanKeys::extend_scan_key(ColumnValueRange<T>& range, int32_t max_sca
     return Status::OK();
 }
 
+template <class T>
+Status OlapScanKeys::extend_scan_key(ColumnValueRange<T>& range, int32_t max_scan_key_num,
+                                     bool* exact_value) {
+    using namespace std;
+    typedef typename set<T>::const_iterator const_iterator_type;

Review Comment:
   1. Use camel case for type.
   2. Prefer `using` to `typedef`
   
   ```suggestion
       using ConstIterator = typename set<T>::const_iterator;
   ```



-- 
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] BiteTheDDDDt commented on a diff in pull request #10278: [Improvement] remove olap filters when use in key ranges

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


##########
be/src/exec/olap_common.h:
##########
@@ -258,6 +258,9 @@ class OlapScanKeys {
     template <class T>
     Status extend_scan_key(ColumnValueRange<T>& range, int32_t max_scan_key_num);
 
+    template <class T>
+    Status extend_scan_key(ColumnValueRange<T>& range, int32_t max_scan_key_num, bool* exact_value);
+

Review Comment:
   I agree with zenoyang‘s opinion, but maybe we can also modify row-based code? It doesn't look like much work.



-- 
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] yiguolei merged pull request #10278: [Improvement] remove olap filters when use in key ranges

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


-- 
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] Gabriel39 commented on a diff in pull request #10278: [Improvement] remove olap filters when use in key ranges

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


##########
be/src/exec/olap_common.h:
##########
@@ -258,6 +258,9 @@ class OlapScanKeys {
     template <class T>
     Status extend_scan_key(ColumnValueRange<T>& range, int32_t max_scan_key_num);
 
+    template <class T>
+    Status extend_scan_key(ColumnValueRange<T>& range, int32_t max_scan_key_num, bool* exact_value);
+

Review Comment:
   To be honest, I considered this way before. Finally I made this because I don't want to mix logics with row-based engine anymore. However, I'm not sure if it's necessary for now and let us wait for more opnions from others :)



##########
be/src/exec/olap_common.h:
##########
@@ -856,4 +859,125 @@ Status OlapScanKeys::extend_scan_key(ColumnValueRange<T>& range, int32_t max_sca
     return Status::OK();
 }
 
+template <class T>
+Status OlapScanKeys::extend_scan_key(ColumnValueRange<T>& range, int32_t max_scan_key_num,
+                                     bool* exact_value) {
+    using namespace std;
+    typedef typename set<T>::const_iterator const_iterator_type;

Review Comment:
   Update. Thanks for your advise!



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