@@ -124,18 +124,20 @@ Status DeleteHandler::generate_delete_predicate(const TabletSchema& schema,
124
124
} else {
125
125
// write sub predicate v1 for compactbility
126
126
std::string condition_str = construct_sub_predicate (condition);
127
- if (TCondition tmp; !DeleteHandler::parse_condition (condition_str, &tmp)) {
128
- LOG (WARNING) << " failed to parse condition_str, condtion="
129
- << ThriftDebugString (condition);
130
- return Status::Error<ErrorCode::INVALID_ARGUMENT>(
131
- " failed to parse condition_str, condtion={}" , ThriftDebugString (condition));
132
- }
133
127
VLOG_NOTICE << __PRETTY_FUNCTION__ << " condition_str: " << condition_str;
134
128
del_pred->add_sub_predicates (condition_str);
135
129
DeleteSubPredicatePB* sub_predicate = del_pred->add_sub_predicates_v2 ();
136
130
if (condition.__isset .column_unique_id ) {
131
+ // only light schema change capable table set this field
137
132
sub_predicate->set_column_unique_id (condition.column_unique_id );
133
+ } else if (TCondition tmp; !DeleteHandler::parse_condition (condition_str, &tmp)) {
134
+ // for non light shema change tables, check regex match for condition str
135
+ LOG (WARNING) << " failed to parse condition_str, condtion="
136
+ << ThriftDebugString (condition);
137
+ return Status::Error<ErrorCode::INVALID_ARGUMENT>(
138
+ " failed to parse condition_str, condtion={}" , ThriftDebugString (condition));
138
139
}
140
+
139
141
sub_predicate->set_column_name (condition.column_name );
140
142
sub_predicate->set_op (trans_op (condition.condition_op ));
141
143
sub_predicate->set_cond_value (condition.condition_values [0 ]);
0 commit comments