morningman commented on a change in pull request #3424:
URL: https://github.com/apache/incubator-doris/pull/3424#discussion_r417369084



##########
File path: be/src/olap/olap_cond.cpp
##########
@@ -681,17 +681,17 @@ int Conditions::delete_pruning_filter(const 
std::vector<KeyRange>& zone_maps) co
     for (auto& cond_it : _columns) {
         /*
          * this is base on the assumption that the delete condition
-         * is only about key field, not about value field.
+         * is only about key field, not about value field except the storage 
model is duplicate.
         */
-        if (cond_it.second->is_key() && cond_it.first > zone_maps.size()) {
+        if ((cond_it.second->is_key() || _schema->keys_type() == 
KeysType::DUP_KEYS) && cond_it.first > zone_maps.size()) {

Review comment:
       `cond_it.second->is_key() || _schema->keys_type() == KeysType::DUP_KEYS`
   
   This condition shows many times. How about extract it to a method?

##########
File path: be/test/olap/delete_handler_test.cpp
##########
@@ -265,6 +358,17 @@ TEST_F(TestDeleteConditionHandler, 
StoreCondNonexistentColumn) {
 
     failed_res = 
_delete_condition_handler.generate_delete_predicate(tablet->tablet_schema(), 
conditions, &del_pred);;
     ASSERT_EQ(OLAP_ERR_DELETE_INVALID_CONDITION, failed_res);
+
+    // 'v'是value列 但是在duplicate 模型汇总

Review comment:
       English




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