-
Notifications
You must be signed in to change notification settings - Fork 761
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9406 from sandflee/limit2
feat(query): add max_query_row_nums
- Loading branch information
Showing
4 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
tests/sqllogictests/suites/base/20+_others/20_00011_max_result_rows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
statement ok | ||
DROP DATABASE IF EXISTS db1 | ||
|
||
statement ok | ||
CREATE DATABASE db1 | ||
|
||
statement ok | ||
USE db1 | ||
|
||
statement ok | ||
CREATE TABLE IF NOT EXISTS t1(a INT) Engine = fuse | ||
|
||
statement ok | ||
INSERT INTO t1 (a) values (1), (2), (3) | ||
|
||
query I | ||
SELECT COUNT() FROM (SELECT * FROM t1) | ||
---- | ||
3 | ||
|
||
statement ok | ||
SET max_result_rows=1 | ||
|
||
query I | ||
SELECT COUNT() FROM (SELECT * FROM t1) | ||
---- | ||
1 | ||
|
||
query I | ||
SELECT COUNT() FROM (SELECT * FROM t1 limit 2) | ||
---- | ||
2 | ||
|
||
statement ok | ||
DROP TABLE t1 | ||
|
||
statement ok | ||
DROP DATABASE db1 |
7c7eb6a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
databend – ./
databend-git-main-databend.vercel.app
databend.rs
databend.vercel.app
databend-databend.vercel.app