Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: chasingegg <[email protected]>
  • Loading branch information
chasingegg committed Dec 5, 2024
1 parent b30afcc commit 90340c3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
14 changes: 12 additions & 2 deletions internal/core/src/exec/expression/UnaryExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,18 @@ PhyUnaryRangeFilterExpr::ExecRangeVisitorImplArray(OffsetVector* input) {
break;
}
case proto::plan::Match: {
UnaryElementFuncForArray<ValueType, proto::plan::Match> func;
func(data, valid_data, size, val, index, res, valid_res);
UnaryElementFuncForArray<ValueType,
proto::plan::Match,
filter_type>
func;
func(data,
valid_data,
size,
val,
index,
res,
valid_res,
offsets);
break;
}
default:
Expand Down
5 changes: 3 additions & 2 deletions internal/core/src/exec/expression/UnaryExpr.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,15 @@ struct UnaryElementFuncForArray {
if constexpr (std::is_same_v<GetType, proto::plan::Array>) {
res[i] = false;
} else {
if (index >= src[i].length()) {
if (index >= src[offset].length()) {
res[i] = false;
continue;
}
PatternMatchTranslator translator;
auto regex_pattern = translator(val);
RegexMatcher matcher(regex_pattern);
auto array_data = src[i].template get_data<GetType>(index);
auto array_data =
src[offset].template get_data<GetType>(index);
res[i] = matcher(array_data);
}
} else {
Expand Down

0 comments on commit 90340c3

Please sign in to comment.