Skip to content

Commit 05c946b

Browse files
committed
return err when json_paths.len=0
1 parent 9b991c4 commit 05c946b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/common/jsonb/src/functions.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,8 @@ pub fn parse_json_path(path: &[u8]) -> Result<Vec<JsonPath>, Error> {
862862
let json_path = JsonPath::String(Cow::Borrowed(s));
863863
if json_paths.len() == 0 {
864864
json_paths.push(json_path);
865+
} else {
866+
return Err(Error::InvalidToken);
865867
}
866868
} else {
867869
if c == b':' || c == b'.' {

0 commit comments

Comments
 (0)