From d7def4aa2d2503d98ff32ad11ff09e8b7b9a8b50 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 1 May 2024 10:42:39 +0200 Subject: [PATCH] wip --- lib/logstorage/parser_test.go | 2 +- lib/logstorage/pipe_stats.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/logstorage/parser_test.go b/lib/logstorage/parser_test.go index be23a41dd6..211b154da4 100644 --- a/lib/logstorage/parser_test.go +++ b/lib/logstorage/parser_test.go @@ -815,7 +815,7 @@ func TestParseQuerySuccess(t *testing.T) { f(`foo|fields *`, `foo | fields *`) f(`foo | fields bar`, `foo | fields bar`) f(`foo|FIELDS bar,Baz , "a,b|c"`, `foo | fields bar, Baz, "a,b|c"`) - f(`foo | Fields x.y:z/a, _b$c`, `foo | fields "x.y:z/a", "_b$c"`) + f(`foo | Fields x.y, "abc:z/a", _b$c`, `foo | fields x.y, "abc:z/a", "_b$c"`) // multiple fields pipes f(`foo | fields bar | fields baz, abc`, `foo | fields bar | fields baz, abc`) diff --git a/lib/logstorage/pipe_stats.go b/lib/logstorage/pipe_stats.go index 60ebc92813..8dd1cf9ab3 100644 --- a/lib/logstorage/pipe_stats.go +++ b/lib/logstorage/pipe_stats.go @@ -512,7 +512,7 @@ func parseFieldName(lex *lexer) (string, error) { if lex.isKeyword(",", "(", ")", "[", "]", "|", "") { return "", fmt.Errorf("unexpected token: %q", lex.token) } - token := getCompoundToken(lex) + token := getCompoundPhrase(lex, true) return token, nil }