This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new 0ff2a9df15b [fix](delete) Only apply regex check on delete condition
str for non-lsc tables (#39357) (#39500)
0ff2a9df15b is described below
commit 0ff2a9df15b9139ee75a3c4c2f19600d90dbd001
Author: Siyang Tang <[email protected]>
AuthorDate: Sat Aug 17 16:56:37 2024 +0800
[fix](delete) Only apply regex check on delete condition str for non-lsc
tables (#39357) (#39500)
## 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 2ab3786b4d0..2ac4aa1f42a 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]