-
Notifications
You must be signed in to change notification settings - Fork 752
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(stateless): add 11_data_type stateless category
- Loading branch information
Showing
13 changed files
with
39 additions
and
3 deletions.
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
Empty file.
2 changes: 2 additions & 0 deletions
2
tests/suites/0_stateless/02_function/02_0053_function_argument_check.sql
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,2 @@ | ||
select if(number, 3) from numbers(10); -- {ErrorCode 1028} | ||
select parse_json(); -- {ErrorCode 1028} |
3 changes: 3 additions & 0 deletions
3
tests/suites/0_stateless/11_data_type/11_0000_data_type_numeric.result
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,3 @@ | ||
-1 255 | ||
127 255 | ||
-128 0 |
31 changes: 31 additions & 0 deletions
31
tests/suites/0_stateless/11_data_type/11_0000_data_type_numeric.sql
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,31 @@ | ||
-- For each data type: | ||
-- 1) bound check | ||
-- 2) conversion check | ||
-- 3) group by check | ||
CREATE DATABASE IF NOT EXISTS data_type; | ||
USE data_type; | ||
|
||
DROP TABLE IF EXISTS t; | ||
CREATE TABLE t(tiny TINYINT, tiny_unsigned TINYINT UNSIGNED); | ||
|
||
-- low bound check | ||
INSERT INTO t VALUES (-1, -1); | ||
SELECT * FROM t; | ||
|
||
-- group by check | ||
-- https://github.com/datafuselabs/databend/issues/4891 | ||
SELECT sum(tiny) FROM t GROUP BY tiny; | ||
|
||
-- low bound check | ||
TRUNCATE TABLE t; | ||
INSERT INTO t VALUES (-129, -1); | ||
SELECT * FROM t; | ||
|
||
-- upper bound check | ||
TRUNCATE TABLE t; | ||
INSERT INTO t VALUES (128, 256); | ||
SELECT * FROM t; | ||
|
||
-- others(TODO) | ||
|
||
DROP DATABASE data_type; |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.