【StarRocks版本】例如:2.2.2
【集群规模】例如:3fe(3 follower)+8be
【机器信息】CPU虚拟核/内存/网卡,例如:40C/192G/千兆
因为sr自带的regexp函数不支持零宽断言,所以我们需要使用udf来匹配零宽断言,代码如下:
public final Boolean evaluate(String content, String regexp) {
Pattern pattern = Pattern.compile(regexp);
Matcher matcher = pattern.matcher(content);
if (matcher.find()) {
return true;
} else {
return false;
}
}
实际测试发现,100万数据匹配耗时10分钟,比读取出来处理速度还慢。