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 2020/08/22 00:04:59 UTC

[GitHub] [incubator-doris] ZhangYu0123 opened a new pull request #4425: Support batch delete[part 2]

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


   ## Proposed changes
   
   - In base compaction, merge and delete deleted rows  #4051.
   
   ## Types of changes
   
   What types of changes does your code introduce to Doris?
   _Put an `x` in the boxes that apply_
   
   - [] Bugfix (non-breaking change which fixes an issue)
   - [x] New feature (non-breaking change which adds functionality)
   - [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
   - [] Documentation Update (if none of the other choices apply)
   - [] Code refactor (Modify the code structure, format the code, etc...)
   
   ## Checklist
   
   _Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
   
   - [x] I have create an issue on (Fix #4051 ), and have described the bug/feature there in detail
   - [x] 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 this change need a document change, I have updated the document
   - [] Any dependent changes have been merged
   
   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] yangzhg merged pull request #4425: Support batch delete[part 2]

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


   


----------------------------------------------------------------
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] yangzhg commented on a change in pull request #4425: Support batch delete[part 2]

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



##########
File path: be/src/olap/tablet_schema.h
##########
@@ -134,6 +134,7 @@ class TabletSchema {
     bool _has_bf_fpp = false;
     double _bf_fpp = 0;
     bool _is_in_memory = false;
+

Review comment:
       why?




----------------------------------------------------------------
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] yangzhg commented on a change in pull request #4425: Support batch delete[part 2]

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



##########
File path: be/src/olap/reader.cpp
##########
@@ -411,13 +414,13 @@ OLAPStatus Reader::_unique_key_next_row(RowCursor* row_cursor, MemPool* mem_pool
             *eof = true;
             return OLAP_SUCCESS;
         }
-
         cur_delete_flag = _next_delete_flag;
         // the verion is in reverse order, the first row is the highest version,
         // in UNIQUE_KEY highest version is the final result, there is no need to
         // merge the lower versions
         direct_copy_row(row_cursor, *_next_key);
         agg_finalize_row(_value_cids, row_cursor, mem_pool);
+

Review comment:
       why?




----------------------------------------------------------------
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] yangzhg commented on a change in pull request #4425: Support batch delete[part 2]

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



##########
File path: be/src/olap/reader.cpp
##########
@@ -1033,14 +1039,20 @@ void Reader::_init_load_bf_columns(const ReaderParams& read_params) {
 }
 
 OLAPStatus Reader::_init_delete_condition(const ReaderParams& read_params) {
+

Review comment:
       unnessary empty lines




----------------------------------------------------------------
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] yangzhg commented on a change in pull request #4425: Support batch delete[part 2]

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



##########
File path: be/src/olap/schema.h
##########
@@ -158,4 +158,4 @@ class Schema {
     int32_t _delete_sign_idx = -1;
 };
 
-} // namespace doris
+} // namespace doris

Review comment:
       why?

##########
File path: be/src/olap/schema.cpp
##########
@@ -105,4 +105,4 @@ Schema::~Schema() {
     }
 }
 
-}
+}

Review comment:
       why?




----------------------------------------------------------------
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] yangzhg commented on a change in pull request #4425: Support batch delete[part 2]

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



##########
File path: be/src/olap/reader.cpp
##########
@@ -427,14 +430,17 @@ OLAPStatus Reader::_unique_key_next_row(RowCursor* row_cursor, MemPool* mem_pool
                 }
                 break;
             }
-
+            

Review comment:
       white spaces




----------------------------------------------------------------
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] yangzhg commented on a change in pull request #4425: Support batch delete[part 2]

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



##########
File path: be/src/olap/field.h
##########
@@ -535,4 +535,4 @@ class FieldFactory {
 
 }  // namespace doris
 
-#endif // DORIS_BE_SRC_OLAP_FIELD_H
+#endif // DORIS_BE_SRC_OLAP_FIELD_H

Review comment:
       why?




----------------------------------------------------------------
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] yangzhg commented on a change in pull request #4425: Support batch delete[part 2]

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



##########
File path: be/src/olap/row_cursor.h
##########
@@ -109,6 +109,14 @@ class RowCursor {
         return column_schema(index)->index_size();
     }
 
+    inline bool is_delete() const {
+        auto sign_idx = _schema->delete_sign_idx();
+        if (sign_idx < 0) {
+            return false;
+        }
+        return (*(char*) (cell(sign_idx).cell_ptr())) > 0;

Review comment:
       better user reinterpret_cast




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