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 2021/04/07 14:47:30 UTC

[GitHub] [incubator-doris] morningman opened a new pull request #5608: [Bug] Fix bug that isPreAggregation is incorrectly set

morningman opened a new pull request #5608:
URL: https://github.com/apache/incubator-doris/pull/5608


   ## Proposed changes
   
   1. The MaterializedViewSelector should be reset for each scan node
   2. On the BE side, columns with delete conditions must be added to the return column.
   
   ## Types of changes
   
   - [x] Bugfix (non-breaking change which fixes an issue)
   
   ## Checklist
   
   - [ ] I have created an issue on (Fix #ISSUE) and described the bug/feature there in detail
   - [ ] Compiling and unit tests pass locally with my changes
   - [ ] I have added tests that prove my fix is effective or that my feature works
   - [ ] If these changes need document changes, I have updated the document
   - [ ] Any dependent changes have been merged
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 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.

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] [incubator-doris] morningman merged pull request #5608: [Bug] Fix bug that isPreAggregation is incorrectly set

Posted by GitBox <gi...@apache.org>.
morningman merged pull request #5608:
URL: https://github.com/apache/incubator-doris/pull/5608


   


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

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] [incubator-doris] morningman commented on a change in pull request #5608: [Bug] Fix bug that isPreAggregation is incorrectly set

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #5608:
URL: https://github.com/apache/incubator-doris/pull/5608#discussion_r608735903



##########
File path: be/src/olap/reader.cpp
##########
@@ -458,7 +458,8 @@ OLAPStatus Reader::_init_params(const ReaderParams& read_params) {
 OLAPStatus Reader::_init_return_columns(const ReaderParams& read_params) {
     if (read_params.reader_type == READER_QUERY) {
         _return_columns = read_params.return_columns;
-        if (!_delete_handler.empty() && read_params.aggregation) {

Review comment:
       For reviewer:
   Remove `read_params.aggregation` because this is just a tricky optimization.
   That is, if `aggregation` is false, than all key columns has already been added to the `_return_columns`.
   And delete conditions can only be applied on key columns, so no need to iterate and add them again.
   
   But this is not always right, because for DUPLICATION KEY table, the delete conditions can be applied on any columns. Although the query optimizer will guarantee that for  DUPLICATION KEY table, the aggregation is always true, but we should not depend on it.
   




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

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