kangpinghuang commented on a change in pull request #654: Make mini load/batch 
load, compaction, delete operation running.
URL: https://github.com/apache/incubator-doris/pull/654#discussion_r259301660
 
 

 ##########
 File path: be/src/olap/delete_handler.cpp
 ##########
 @@ -45,6 +45,34 @@ using google::protobuf::RepeatedPtrField;
 
 namespace doris {
 
+OLAPStatus DeleteConditionHandler::generate_delete_predicate(
+        const TabletSchema& schema,
+        const std::vector<TCondition>& conditions,
+        DeletePredicatePB* del_pred) {
+    if (conditions.size() == 0) {
+        LOG(WARNING) << "invalid parameters for store_cond."
+                     << " condition_size=" << conditions.size();
+        return OLAP_ERR_DELETE_INVALID_PARAMETERS;
+    }
+
+    // 检查删除条件是否符合要求
+    for (const TCondition& condition : conditions) {
+        if (check_condition_valid(schema, condition) != OLAP_SUCCESS) {
+            LOG(WARNING) << "invalid condition. condition=" << 
ThriftDebugString(condition);
+            return OLAP_ERR_DELETE_INVALID_CONDITION;
+        }
+    }
+
+    // 存储删除条件
+    for (const TCondition& condition : conditions) {
+        string condition_str = construct_sub_predicates(condition);
+        del_pred->add_sub_predicates(condition_str);
+        LOG(INFO) << "store one sub-delete condition. condition=" << 
condition_str;
 
 Review comment:
   is this log necessary? if true, use vlog

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to