ClickHouse/tests/queries/0_stateless/02565_analyzer_limit_settings.reference

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

71 lines
1.2 KiB
Plaintext
Raw Normal View History

-- { echoOn }
SET limit = 0;
SELECT * FROM numbers(10);
0
1
2
3
4
5
6
7
8
9
SELECT * FROM numbers(10) SETTINGS limit=5, offset=2;
2
3
4
5
6
SELECT count(*) FROM (SELECT * FROM numbers(10));
10
SELECT count(*) FROM (SELECT * FROM numbers(10) SETTINGS limit=5);
5
SELECT count(*) FROM (SELECT * FROM numbers(10)) SETTINGS limit=5;
10
SELECT count(*) FROM view(SELECT * FROM numbers(10));
10
SELECT count(*) FROM view(SELECT * FROM numbers(10) SETTINGS limit=5);
5
SELECT count(*) FROM view(SELECT * FROM numbers(10)) SETTINGS limit=5;
10
SET limit = 3;
SELECT * FROM numbers(10);
0
1
2
SELECT * FROM numbers(10) SETTINGS limit=5, offset=2;
2
3
4
5
6
SELECT count(*) FROM (SELECT * FROM numbers(10));
10
SELECT count(*) FROM (SELECT * FROM numbers(10) SETTINGS limit=5);
5
SELECT count(*) FROM (SELECT * FROM numbers(10)) SETTINGS limit=5;
10
SELECT count(*) FROM view(SELECT * FROM numbers(10));
10
SELECT count(*) FROM view(SELECT * FROM numbers(10) SETTINGS limit=5);
5
SELECT count(*) FROM view(SELECT * FROM numbers(10)) SETTINGS limit=5;
10
SET limit = 4;
SET offset = 1;
SELECT * FROM numbers(10);
1
2
3
4
SELECT * FROM numbers(10) LIMIT 3 OFFSET 2;
3
4
5
SELECT * FROM numbers(10) LIMIT 5 OFFSET 2;
3
4
5
6