From f771066f175c7bde9fd5cbcf39ab855afd5d5786 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 5 Sep 2023 17:17:38 +0300 Subject: add mapr aggregration on CSV integr test --- internal/mapr/setcondition.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'internal/mapr/setcondition.go') diff --git a/internal/mapr/setcondition.go b/internal/mapr/setcondition.go index 9dcd690..308a0f4 100644 --- a/internal/mapr/setcondition.go +++ b/internal/mapr/setcondition.go @@ -37,6 +37,13 @@ func makeSetConditions(tokens []token) (set []setCondition, err error) { return sc, nil, err } + // Seems like a quoted string? E.g.: "set $foo = `count(bar)`" + // So don't interpret `count` as a function! + if tokens[2].quotesStripped { + sc.rType = Field + return sc, tokens[3:], nil + } + // Seems like a function call? if strings.HasSuffix(sc.rString, ")") { functionStack, functionArg, err := funcs.NewFunctionStack(tokens[2].str) -- cgit v1.2.3