Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(fuse-table): add data types test to fuse-compat test #7018

Merged
merged 1 commit into from
Aug 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 77 additions & 3 deletions tests/fuse-compat/compat-logictest/fuse_compat_read
Original file line number Diff line number Diff line change
@@ -1,6 +1,80 @@
statement query I
select a+b from t;
select c_bool FROM fuse_compat_table;

----
2
4
0

statement query I
select c_tinyint FROM fuse_compat_table;

----
127

statement query I
select c_smallint FROM fuse_compat_table;

----
3267

statement query I
select c_int FROM fuse_compat_table;

----
2147483647


statement query I
select c_bigint FROM fuse_compat_table;

----
9223372036854775807


statement query F
select c_float FROM fuse_compat_table;

----
3.4

statement query F
select c_double FROM fuse_compat_table;

----
1.7

statement query T
select c_date FROM fuse_compat_table;

----
9999-12-31

statement query T
select c_timestamp FROM fuse_compat_table;

----
1991-01-01 00:00:00.000000

statement query T
select c_varchar FROM fuse_compat_table;

----
varchar


statement query T
select c_array FROM fuse_compat_table;

----
[1,2,3,["a","b","c"]]

statement query T
select c_object FROM fuse_compat_table;

----
{"a":1,"b":{"c":2}}

statement query T
select c_variant FROM fuse_compat_table;

----
[1,{"a":1,"b":{"c":2}}]
34 changes: 31 additions & 3 deletions tests/fuse-compat/compat-logictest/fuse_compat_write
Original file line number Diff line number Diff line change
@@ -1,8 +1,36 @@
statement ok
DROP TABLE IF EXISTS t;
DROP TABLE IF EXISTS fuse_compat_table;

statement ok
create table t(a int,b int) Engine = Fuse;
CREATE TABLE fuse_compat_table (
c_bool BOOL,
c_tinyint TINYINT,
c_smallint SMALLINT,
c_int INT,
c_bigint BIGINT,
c_float FLOAT,
c_double DOUBLE,
c_date DATE,
c_timestamp TIMESTAMP,
c_varchar VARCHAR,
c_array ARRAY,
c_object OBJECT,
c_variant VARIANT
) Engine = Fuse;

statement ok
insert into t values(1,1),(2,2);
INSERT INTO fuse_compat_table VALUES(
0,
127,
3267,
2147483647,
9223372036854775807,
3.4,
1.7,
'9999-12-31',
'1991-01-01 00:00:00',
'varchar',
parse_json('[1,2,3,["a","b","c"]]'),
parse_json('{"a":1,"b":{"c":2}}'),
parse_json('[1,{"a":1,"b":{"c":2}}]')
);