From 566483bfc5ee314b32be3bd3e074d5e4ecc21b6e Mon Sep 17 00:00:00 2001 From: tsy Date: Wed, 14 Aug 2024 18:13:49 +0800 Subject: [PATCH] [fix] Only apply regex check on delete condition str for non-lsc tables --- be/src/olap/delete_handler.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/be/src/olap/delete_handler.cpp b/be/src/olap/delete_handler.cpp index 6819d7d90f3ef7..66859a069cc231 100644 --- a/be/src/olap/delete_handler.cpp +++ b/be/src/olap/delete_handler.cpp @@ -124,18 +124,20 @@ Status DeleteHandler::generate_delete_predicate(const TabletSchema& schema, } else { // write sub predicate v1 for compactbility std::string condition_str = construct_sub_predicate(condition); - if (TCondition tmp; !DeleteHandler::parse_condition(condition_str, &tmp)) { - LOG(WARNING) << "failed to parse condition_str, condtion=" - << ThriftDebugString(condition); - return Status::Error( - "failed to parse condition_str, condtion={}", ThriftDebugString(condition)); - } VLOG_NOTICE << __PRETTY_FUNCTION__ << " condition_str: " << condition_str; del_pred->add_sub_predicates(condition_str); DeleteSubPredicatePB* sub_predicate = del_pred->add_sub_predicates_v2(); if (condition.__isset.column_unique_id) { + // only light schema change capable table set this field sub_predicate->set_column_unique_id(condition.column_unique_id); + } else if (TCondition tmp; !DeleteHandler::parse_condition(condition_str, &tmp)) { + // for non light shema change tables, check regex match for condition str + LOG(WARNING) << "failed to parse condition_str, condtion=" + << ThriftDebugString(condition); + return Status::Error( + "failed to parse condition_str, condtion={}", ThriftDebugString(condition)); } + sub_predicate->set_column_name(condition.column_name); sub_predicate->set_op(trans_op(condition.condition_op)); sub_predicate->set_cond_value(condition.condition_values[0]);