mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
optimize limit 1,0 and test.
This commit is contained in:
parent
110568f980
commit
f4b7cae998
@ -790,7 +790,7 @@ static std::pair<UInt64, UInt64> getLimitLengthAndOffset(const ASTSelectQuery &
|
|||||||
if (query.limitLength())
|
if (query.limitLength())
|
||||||
{
|
{
|
||||||
length = getLimitUIntValue(query.limitLength(), context);
|
length = getLimitUIntValue(query.limitLength(), context);
|
||||||
if (query.limitOffset())
|
if (query.limitOffset() && length)
|
||||||
offset = getLimitUIntValue(query.limitOffset(), context);
|
offset = getLimitUIntValue(query.limitOffset(), context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
SELECT count() FROM system.numbers LIMIT 1, 0;
|
Loading…
Reference in New Issue
Block a user