From 0f02d473d99789c0937b6dbfc4d7be49bb7a2b63 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 24 Jun 2023 12:56:00 +0200 Subject: [PATCH] Improve parsing of path in clickhouse-keeper-client Before this patch: / :) get /tables/default/data/block_numbers/0-7 Syntax error: failed at position 40 ('0'): get /tables/default/data/block_numbers/0-7 Expected end of query Signed-off-by: Azat Khuzhin --- programs/keeper-client/Parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/keeper-client/Parser.cpp b/programs/keeper-client/Parser.cpp index 0f3fc39704e..3420ccb2219 100644 --- a/programs/keeper-client/Parser.cpp +++ b/programs/keeper-client/Parser.cpp @@ -30,7 +30,7 @@ bool parseKeeperPath(IParser::Pos & pos, Expected & expected, String & path) return parseIdentifierOrStringLiteral(pos, expected, path); String result; - while (pos->type == TokenType::BareWord || pos->type == TokenType::Slash || pos->type == TokenType::Dot) + while (pos->type != TokenType::Whitespace && pos->type != TokenType::EndOfStream) { result.append(pos->begin, pos->end); ++pos;