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/04/29 14:53:41 UTC

[GitHub] [incubator-doris] morningman commented on a change in pull request #3424: allow delete duplicated non-key column using delete from

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:
users@infra.apache.org



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