mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-31 15:06:26 +00:00
wip
This commit is contained in:
parent
7ee0a851a9
commit
bae5ff23f5
2 changed files with 3 additions and 2 deletions
|
@ -398,7 +398,7 @@ func ParseQuery(s string) (*Query, error) {
|
|||
return nil, err
|
||||
}
|
||||
if !lex.isEnd() {
|
||||
return nil, fmt.Errorf("unexpected unparsed tail; context: [%s]; tail: [%s]", lex.context(), lex.s)
|
||||
return nil, fmt.Errorf("unexpected unparsed tail after [%s]; context: [%s]; tail: [%s]", q, lex.context(), lex.s)
|
||||
}
|
||||
return q, nil
|
||||
}
|
||||
|
@ -582,7 +582,7 @@ func getCompoundFuncArg(lex *lexer) string {
|
|||
rawArg := lex.rawToken
|
||||
lex.nextToken()
|
||||
suffix := ""
|
||||
for !lex.isSkippedSpace && !lex.isKeyword("*", ",", ")", "|", "") {
|
||||
for !lex.isSkippedSpace && !lex.isKeyword("*", ",", "(", ")", "|", "") {
|
||||
suffix += lex.rawToken
|
||||
lex.nextToken()
|
||||
}
|
||||
|
|
|
@ -713,6 +713,7 @@ func TestParseQuerySuccess(t *testing.T) {
|
|||
f(`in(err|fields x)`, `in(err | fields x)`)
|
||||
f(`ip:in(foo and user:in(admin, moderator)|fields ip)`, `ip:in(foo user:in(admin,moderator) | fields ip)`)
|
||||
f(`x:in(_time:5m y:in(*|fields z) | stats by (q) count() rows|fields q)`, `x:in(_time:5m y:in(* | fields z) | stats by (q) count(*) as rows | fields q)`)
|
||||
f(`in(bar:in(1,2,3) | uniq (x)) | stats count() rows`, `in(bar:in(1,2,3) | uniq by (x)) | stats count(*) as rows`)
|
||||
|
||||
// ipv4_range filter
|
||||
f(`ipv4_range(1.2.3.4, "5.6.7.8")`, `ipv4_range(1.2.3.4, 5.6.7.8)`)
|
||||
|
|
Loading…
Reference in a new issue