Merge pull request #71987 from ClickHouse/miscellaneous-4

Miscellaneous
This commit is contained in:
Alexey Milovidov 2024-11-18 20:47:39 +00:00 committed by GitHub
commit 6aa2fe525e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1309,13 +1309,11 @@ bool ParserCollectionOfLiterals<Collection>::parseImpl(Pos & pos, ASTPtr & node,
{
if (pos->type == closing_bracket)
{
std::shared_ptr<ASTLiteral> literal;
/// Parse one-element tuples (e.g. (1)) later as single values for backward compatibility.
if (std::is_same_v<Collection, Tuple> && layers.back().arr.size() == 1)
return false;
literal = std::make_shared<ASTLiteral>(std::move(layers.back().arr));
std::shared_ptr<ASTLiteral> literal = std::make_shared<ASTLiteral>(std::move(layers.back().arr));
literal->begin = layers.back().literal_begin;
literal->end = ++pos;