mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-31 15:06:26 +00:00
wip
This commit is contained in:
parent
bae5ff23f5
commit
4cfb2fe60c
2 changed files with 4 additions and 0 deletions
|
@ -1090,6 +1090,9 @@ func parseFuncArgs(lex *lexer, fieldName string, callback func(args []string) (f
|
|||
if lex.isKeyword(",") {
|
||||
return nil, fmt.Errorf("unexpected ',' - missing arg in %s()", funcName)
|
||||
}
|
||||
if lex.isKeyword("(") {
|
||||
return nil, fmt.Errorf("unexpected '(' - missing arg in %s()", funcName)
|
||||
}
|
||||
arg := getCompoundFuncArg(lex)
|
||||
args = append(args, arg)
|
||||
if lex.isKeyword(")") {
|
||||
|
|
|
@ -714,6 +714,7 @@ func TestParseQuerySuccess(t *testing.T) {
|
|||
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`)
|
||||
f(`in((1) | fields z) | stats count() rows`, `in(1 | fields z) | 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