fix: underscore matching not work (#30826)

issue: https://github.com/milvus-io/milvus/issues/30721

Signed-off-by: longjiquan <jiquan.long@zilliz.com>
pull/30013/head
Jiquan Long 2024-02-29 10:41:00 +08:00 committed by GitHub
parent b023bd09b3
commit dcfc35316f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -5,7 +5,7 @@ import (
)
var wildcards = map[byte]struct{}{
// '_': {}, // TODO
'_': {},
'%': {},
}

View File

@ -121,6 +121,12 @@ func Test_translatePatternMatch(t *testing.T) {
wantOperand: "prefix%suffix",
wantErr: false,
},
{
args: args{pattern: "_0"},
wantOp: planpb.OpType_Match,
wantOperand: "_0",
wantErr: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {