Skip to content

Commit

Permalink
Merge pull request #7018 from drmingdrmer/2-fuse-compat
Browse files Browse the repository at this point in the history
ci(fuse-table): add data types test to fuse-compat test
  • Loading branch information
BohuTANG authored Aug 7, 2022
2 parents a65c8d3 + 09968e1 commit 0d96f58
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 6 deletions.
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}}]')
);

1 comment on commit 0d96f58

@vercel
Copy link

@vercel vercel bot commented on 0d96f58 Aug 7, 2022

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-databend.vercel.app
databend-git-main-databend.vercel.app
databend.rs
databend.vercel.app

Please sign in to comment.