This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 4244287168d [fix](delete) Only apply regex check on delete condition
str for non-lsc tables (#39357)
4244287168d is described below
commit 4244287168d912a6276097c733b90c1c6894795d
Author: Siyang Tang <[email protected]>
AuthorDate: Thu Aug 15 20:21:12 2024 +0800
[fix](delete) Only apply regex check on delete condition str for non-lsc
tables (#39357)
## Proposed changes
Light schema change capable tables will work on delete sub predicate v2
and doesn't need this check.
---
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 6819d7d90f3..66859a069cc 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<ErrorCode::INVALID_ARGUMENT>(
- "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<ErrorCode::INVALID_ARGUMENT>(
+ "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]);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]