Skip to content

Commit

Permalink
Merge pull request ClickHouse#71987 from ClickHouse/miscellaneous-4
Browse files Browse the repository at this point in the history
Miscellaneous
  • Loading branch information
alexey-milovidov authored Nov 18, 2024
2 parents 03c5e4b + 01c5762 commit 6aa2fe5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Parsers/ExpressionElementParsers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 6aa2fe5

Please sign in to comment.