mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
Removed support for constant expressions in TOP because they cannot work
This commit is contained in:
parent
d9ab923a2a
commit
2c7cf23f3f
@ -71,16 +71,18 @@ bool ParserSelectQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
|
||||
|
||||
if (s_top.ignore(pos, expected))
|
||||
{
|
||||
ParserNumber num;
|
||||
|
||||
if (open_bracket.ignore(pos, expected))
|
||||
{
|
||||
if (!exp_elem.parse(pos, select_query->limit_length, expected))
|
||||
if (!num.parse(pos, select_query->limit_length, expected))
|
||||
return false;
|
||||
if (!close_bracket.ignore(pos, expected))
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!exp_elem.parse(pos, select_query->limit_length, expected))
|
||||
if (!num.parse(pos, select_query->limit_length, expected))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ SELECT count() <= 1 FROM (SELECT number FROM numbers(10) LIMIT randConstant() %
|
||||
SELECT number FROM numbers(10) LIMIT 0 + 1 BY number;
|
||||
SELECT number FROM numbers(10) LIMIT 0 BY number;
|
||||
|
||||
SELECT TOP(3 + 2) number FROM numbers(10);
|
||||
SELECT TOP 5 * FROM numbers(10);
|
||||
|
||||
SELECT * FROM numbers(10) LIMIT 0.33 / 0.165 - 0.33 + 0.67; -- { serverError 440 }
|
||||
SELECT * FROM numbers(10) LIMIT LENGTH('NNN') + COS(0), toDate('0000-00-02'); -- { serverError 440 }
|
||||
|
Loading…
Reference in New Issue
Block a user