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

[test](jdbc catalog) add more jdbc catalog extreme test #47525

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
104 changes: 104 additions & 0 deletions docker/thirdparties/docker-compose/clickhouse/init/03-create-table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -288,4 +288,108 @@ CREATE TABLE doris_test.dt_with_tz
dt2 DateTime64(6, 'Asia/Shanghai')
)
ENGINE = MergeTree
ORDER BY id;

CREATE TABLE doris_test.extreme_test
(
id UInt64,
-- Integer types (signed and unsigned) and their Nullable versions
int8_col Int8,
int8_nullable Nullable(Int8),
int16_col Int16,
int16_nullable Nullable(Int16),
int32_col Int32,
int32_nullable Nullable(Int32),
int64_col Int64,
int64_nullable Nullable(Int64),
uint8_col UInt8,
uint8_nullable Nullable(UInt8),
uint16_col UInt16,
uint16_nullable Nullable(UInt16),
uint32_col UInt32,
uint32_nullable Nullable(UInt32),
uint64_col UInt64,
uint64_nullable Nullable(UInt64),
-- Floating point types
float32_col Float32,
float32_nullable Nullable(Float32),
float64_col Float64,
float64_nullable Nullable(Float64),
-- Decimal type (defined here with precision 18 and scale 2)
decimal_col Decimal(18,2),
decimal_nullable Nullable(Decimal(18,2)),
-- Date and DateTime types
date_col Date,
date_nullable Nullable(Date),
datetime_col DateTime,
datetime_nullable Nullable(DateTime),
-- String types
string_col String,
string_nullable Nullable(String),
fixedstring_col FixedString(10),
fixedstring_nullable Nullable(FixedString(10)),
-- Enum type (Enum8 valid range is -128 to 127; here three enum values are defined)
enum_col Enum8('A' = 1, 'B' = 2, 'C' = 3),
enum_nullable Nullable(Enum8('A' = 1, 'B' = 2, 'C' = 3)),
-- UUID type
uuid_col UUID,
uuid_nullable Nullable(UUID),
-- IP address types
ipv4_col IPv4,
ipv4_nullable Nullable(IPv4),
ipv6_col IPv6,
ipv6_nullable Nullable(IPv6)
) ENGINE = MergeTree()
ORDER BY id;

CREATE TABLE doris_test.extreme_test_multi_block
(
id UInt64,
-- Integer types (signed and unsigned) and their Nullable versions
int8_col Int8,
int8_nullable Nullable(Int8),
int16_col Int16,
int16_nullable Nullable(Int16),
int32_col Int32,
int32_nullable Nullable(Int32),
int64_col Int64,
int64_nullable Nullable(Int64),
uint8_col UInt8,
uint8_nullable Nullable(UInt8),
uint16_col UInt16,
uint16_nullable Nullable(UInt16),
uint32_col UInt32,
uint32_nullable Nullable(UInt32),
uint64_col UInt64,
uint64_nullable Nullable(UInt64),
-- Floating point types
float32_col Float32,
float32_nullable Nullable(Float32),
float64_col Float64,
float64_nullable Nullable(Float64),
-- Decimal type (defined here with precision 18 and scale 2)
decimal_col Decimal(18,2),
decimal_nullable Nullable(Decimal(18,2)),
-- Date and DateTime types
date_col Date,
date_nullable Nullable(Date),
datetime_col DateTime,
datetime_nullable Nullable(DateTime),
-- String types
string_col String,
string_nullable Nullable(String),
fixedstring_col FixedString(10),
fixedstring_nullable Nullable(FixedString(10)),
-- Enum type (Enum8 valid range is -128 to 127; here three enum values are defined)
enum_col Enum8('A' = 1, 'B' = 2, 'C' = 3),
enum_nullable Nullable(Enum8('A' = 1, 'B' = 2, 'C' = 3)),
-- UUID type
uuid_col UUID,
uuid_nullable Nullable(UUID),
-- IP address types
ipv4_col IPv4,
ipv4_nullable Nullable(IPv4),
ipv6_col IPv6,
ipv6_nullable Nullable(IPv6)
) ENGINE = MergeTree()
ORDER BY id;
18 changes: 18 additions & 0 deletions docker/thirdparties/docker-compose/clickhouse/init/04-insert.sql
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,21 @@ INSERT INTO doris_test.final_test Values (1, 'second');
INSERT INTO doris_test.ts values (1,1694438743);

INSERT INTO doris_test.dt_with_tz values(1, '2022-01-02 00:00:00','2022-01-02 00:00:00.000000');

INSERT INTO doris_test.extreme_test VALUES (1,127,127,32767,32767,2147483647,2147483647,9223372036854775807,9223372036854775807,255,255,65535,65535,4294967295,4294967295,18446744073709551615,18446744073709551615,3.4028235e38,3.4028235e38,1.7976931348623157e308,1.7976931348623157e308,9999999999999999.99,9999999999999999.99,'2106-02-07','2106-02-07','2106-02-07 06:28:15','2106-02-07 06:28:15','max_string','max_string','XXXXXXXXXX','XXXXXXXXXX','C','C','ffffffff-ffff-ffff-ffff-ffffffffffff','ffffffff-ffff-ffff-ffff-ffffffffffff','255.255.255.255','255.255.255.255','ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff','ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff');
INSERT INTO doris_test.extreme_test VALUES (2,-128,-128,-32768,-32768,-2147483648,-2147483648,-9223372036854775808,-9223372036854775808,0,0,0,0,0,0,0,0,-3.4028235e38,-3.4028235e38,-1.7976931348623157e308,-1.7976931348623157e308,-9999999999999999.99,-9999999999999999.99,'1970-01-01','1970-01-01','1970-01-01 00:00:00','1970-01-01 00:00:00','min_string','min_string','0000000000','0000000000','A','A','00000000-0000-0000-0000-000000000000','00000000-0000-0000-0000-000000000000','0.0.0.0','0.0.0.0','0000:0000:0000:0000:0000:0000:0000:0000','0000:0000:0000:0000:0000:0000:0000:0000');
INSERT INTO doris_test.extreme_test VALUES (3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'1970-01-01','1970-01-01','1970-01-01 00:00:00','1970-01-01 00:00:00','','','','','A','A','00000000-0000-0000-0000-000000000000','00000000-0000-0000-0000-000000000000','0.0.0.0','0.0.0.0','0000:0000:0000:0000:0000:0000:0000:0000','0000:0000:0000:0000:0000:0000:0000:0000');
INSERT INTO doris_test.extreme_test VALUES (4,0,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0,NULL,'1970-01-01',NULL,'1970-01-01 00:00:00',NULL,'',NULL,'',NULL,'A',NULL,'00000000-0000-0000-0000-000000000000',NULL,'0.0.0.0',NULL,'0000:0000:0000:0000:0000:0000:0000:0000',NULL);

insert into doris_test.extreme_test_multi_block select * from doris_test.extreme_test;
insert into doris_test.extreme_test_multi_block select * from doris_test.extreme_test_multi_block;
insert into doris_test.extreme_test_multi_block select * from doris_test.extreme_test_multi_block;
insert into doris_test.extreme_test_multi_block select * from doris_test.extreme_test_multi_block;
insert into doris_test.extreme_test_multi_block select * from doris_test.extreme_test_multi_block;
insert into doris_test.extreme_test_multi_block select * from doris_test.extreme_test_multi_block;
insert into doris_test.extreme_test_multi_block select * from doris_test.extreme_test_multi_block;
insert into doris_test.extreme_test_multi_block select * from doris_test.extreme_test_multi_block;
insert into doris_test.extreme_test_multi_block select * from doris_test.extreme_test_multi_block;
insert into doris_test.extreme_test_multi_block select * from doris_test.extreme_test_multi_block;
insert into doris_test.extreme_test_multi_block select * from doris_test.extreme_test_multi_block;
insert into doris_test.extreme_test_multi_block select * from doris_test.extreme_test;
72 changes: 72 additions & 0 deletions docker/thirdparties/docker-compose/oracle/init/03-create-table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,75 @@ create table doris_test.lower_test (
"doris" varchar2(20)
);

create table doris_test.extreme_test (
id int,
n1 number,
n2 number(38),
n3 number(9,2),
n4 int,
n5 smallint,
n6 decimal(5,2),
n7 float,
n8 float(2),
n9 real,
tinyint_value1 number(2,0),
smallint_value1 number(4,0),
int_value1 number(9,0),
bigint_value1 number(18,0),
tinyint_value2 number(3,0),
smallint_value2 number(5,0),
int_value2 number(10,0),
bigint_value2 number(19,0),
country char,
city nchar(6),
address varchar2(4000),
name nvarchar2(6),
remark long,
num1 NUMBER(5,2),
num2 NUMBER(5, -2),
num4 NUMBER(5,7),
t1 date,
t2 timestamp(3),
t3 timestamp(6),
t4 timestamp(9),
t5 timestamp,
t6 interval year(3) to month,
t7 interval day(3) to second(6)
);

create table doris_test.extreme_test_multi_block (
id int,
n1 number,
n2 number(38),
n3 number(9,2),
n4 int,
n5 smallint,
n6 decimal(5,2),
n7 float,
n8 float(2),
n9 real,
tinyint_value1 number(2,0),
smallint_value1 number(4,0),
int_value1 number(9,0),
bigint_value1 number(18,0),
tinyint_value2 number(3,0),
smallint_value2 number(5,0),
int_value2 number(10,0),
bigint_value2 number(19,0),
country char,
city nchar(6),
address varchar2(4000),
name nvarchar2(6),
remark long,
num1 NUMBER(5,2),
num2 NUMBER(5, -2),
num4 NUMBER(5,7),
t1 date,
t2 timestamp(3),
t3 timestamp(6),
t4 timestamp(9),
t5 timestamp,
t6 interval year(3) to month,
t7 interval day(3) to second(6)
);

50 changes: 50 additions & 0 deletions docker/thirdparties/docker-compose/oracle/init/04-insert.sql
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,54 @@ null, null, null, null, null, null, null

insert into doris_test.lower_test values ('DORIS', 'Doris', 'doris');

INSERT INTO doris_test.extreme_test VALUES (2147483647, 9999999999999999999999999999999999999, 99999999999999999999999999999999999999, 999999.99, 2147483647, 32767, 999.99, 3.402823466E+38, 3.402823466E+38, 3.402823466E+38, 99, 9999, 999999999, 999999999999999999, 999, 99999, 9999999999, 9999999999999999999, 'Z', '北京', RPAD('A', 4000, 'A'), '深圳', RPAD('L', 4000, 'L'), 999.99, 99900, 0.0000999, TO_DATE('9999-12-31', 'YYYY-MM-DD'), TIMESTAMP '9999-12-31 23:59:59.999', TIMESTAMP '9999-12-31 23:59:59.999999', TIMESTAMP '9999-12-31 23:59:59.999999999', TIMESTAMP '9999-12-31 23:59:59.999999', INTERVAL '99-11' YEAR TO MONTH, INTERVAL '99 23:59:59.999999' DAY TO SECOND);
INSERT INTO doris_test.extreme_test VALUES (-2147483648, -9999999999999999999999999999999999999, -99999999999999999999999999999999999999, -9999999.99, -2147483648, -32768, -999.99, -3.402823466E+38, -3.402823466E+38, -3.402823466E+38, -99, -9999, -999999999, -999999999999999999, -999, -99999, -9999999999, -9999999999999999999, 'A', '上海', 'B', '广州', 'S', -999.99, -99900, -0.0000999, TO_DATE('0001-01-01', 'YYYY-MM-DD'), TIMESTAMP '0001-01-01 00:00:00.000', TIMESTAMP '0001-01-01 00:00:00.000000', TIMESTAMP '0001-01-01 00:00:00.000000000', TIMESTAMP '0001-01-01 00:00:00.000000', INTERVAL '-99-11' YEAR TO MONTH, INTERVAL '-99 23:59:59.999999' DAY TO SECOND);
INSERT INTO doris_test.extreme_test VALUES (0, 0, 0, 0.00, 0, 0, 0.00, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, ' ', ' ', '', '', '', 0.00, 0, 0.0000000, TO_DATE('1970-01-01', 'YYYY-MM-DD'), TIMESTAMP '1970-01-01 00:00:00.000', TIMESTAMP '1970-01-01 00:00:00.000000', TIMESTAMP '1970-01-01 00:00:00.000000000', TIMESTAMP '1970-01-01 00:00:00.000000', INTERVAL '0-0' YEAR TO MONTH, INTERVAL '0 00:00:00.000000' DAY TO SECOND);
INSERT INTO doris_test.extreme_test VALUES (NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

INSERT INTO doris_test.extreme_test_multi_block (
id, n1, n2, n3, n4, n5, n6, n7, n8, n9,
tinyint_value1, smallint_value1, int_value1, bigint_value1,
tinyint_value2, smallint_value2, int_value2, bigint_value2,
country, city, address, name, remark,
num1, num2, num4,
t1, t2, t3, t4, t5, t6, t7
)
SELECT
id, n1, n2, n3, n4, n5, n6, n7, n8, n9,
tinyint_value1, smallint_value1, int_value1, bigint_value1,
tinyint_value2, smallint_value2, int_value2, bigint_value2,
country, city, address, name, '',
num1, num2, num4,
t1, t2, t3, t4, t5, t6, t7
FROM doris_test.extreme_test;

INSERT INTO doris_test.extreme_test_multi_block (id, n1, n2, n3, n4, n5, n6, n7, n8, n9, tinyint_value1, smallint_value1, int_value1, bigint_value1, tinyint_value2, smallint_value2, int_value2, bigint_value2, country, city, address, name, remark, num1, num2, num4, t1, t2, t3, t4, t5, t6, t7) SELECT id, n1, n2, n3, n4, n5, n6, n7, n8, n9, tinyint_value1, smallint_value1, int_value1, bigint_value1, tinyint_value2, smallint_value2, int_value2, bigint_value2, country, city, address, name, '', num1, num2, num4, t1, t2, t3, t4, t5, t6, t7 FROM doris_test.extreme_test_multi_block;
INSERT INTO doris_test.extreme_test_multi_block (id, n1, n2, n3, n4, n5, n6, n7, n8, n9, tinyint_value1, smallint_value1, int_value1, bigint_value1, tinyint_value2, smallint_value2, int_value2, bigint_value2, country, city, address, name, remark, num1, num2, num4, t1, t2, t3, t4, t5, t6, t7) SELECT id, n1, n2, n3, n4, n5, n6, n7, n8, n9, tinyint_value1, smallint_value1, int_value1, bigint_value1, tinyint_value2, smallint_value2, int_value2, bigint_value2, country, city, address, name, '', num1, num2, num4, t1, t2, t3, t4, t5, t6, t7 FROM doris_test.extreme_test_multi_block;
INSERT INTO doris_test.extreme_test_multi_block (id, n1, n2, n3, n4, n5, n6, n7, n8, n9, tinyint_value1, smallint_value1, int_value1, bigint_value1, tinyint_value2, smallint_value2, int_value2, bigint_value2, country, city, address, name, remark, num1, num2, num4, t1, t2, t3, t4, t5, t6, t7) SELECT id, n1, n2, n3, n4, n5, n6, n7, n8, n9, tinyint_value1, smallint_value1, int_value1, bigint_value1, tinyint_value2, smallint_value2, int_value2, bigint_value2, country, city, address, name, '', num1, num2, num4, t1, t2, t3, t4, t5, t6, t7 FROM doris_test.extreme_test_multi_block;
INSERT INTO doris_test.extreme_test_multi_block (id, n1, n2, n3, n4, n5, n6, n7, n8, n9, tinyint_value1, smallint_value1, int_value1, bigint_value1, tinyint_value2, smallint_value2, int_value2, bigint_value2, country, city, address, name, remark, num1, num2, num4, t1, t2, t3, t4, t5, t6, t7) SELECT id, n1, n2, n3, n4, n5, n6, n7, n8, n9, tinyint_value1, smallint_value1, int_value1, bigint_value1, tinyint_value2, smallint_value2, int_value2, bigint_value2, country, city, address, name, '', num1, num2, num4, t1, t2, t3, t4, t5, t6, t7 FROM doris_test.extreme_test_multi_block;
INSERT INTO doris_test.extreme_test_multi_block (id, n1, n2, n3, n4, n5, n6, n7, n8, n9, tinyint_value1, smallint_value1, int_value1, bigint_value1, tinyint_value2, smallint_value2, int_value2, bigint_value2, country, city, address, name, remark, num1, num2, num4, t1, t2, t3, t4, t5, t6, t7) SELECT id, n1, n2, n3, n4, n5, n6, n7, n8, n9, tinyint_value1, smallint_value1, int_value1, bigint_value1, tinyint_value2, smallint_value2, int_value2, bigint_value2, country, city, address, name, '', num1, num2, num4, t1, t2, t3, t4, t5, t6, t7 FROM doris_test.extreme_test_multi_block;
INSERT INTO doris_test.extreme_test_multi_block (id, n1, n2, n3, n4, n5, n6, n7, n8, n9, tinyint_value1, smallint_value1, int_value1, bigint_value1, tinyint_value2, smallint_value2, int_value2, bigint_value2, country, city, address, name, remark, num1, num2, num4, t1, t2, t3, t4, t5, t6, t7) SELECT id, n1, n2, n3, n4, n5, n6, n7, n8, n9, tinyint_value1, smallint_value1, int_value1, bigint_value1, tinyint_value2, smallint_value2, int_value2, bigint_value2, country, city, address, name, '', num1, num2, num4, t1, t2, t3, t4, t5, t6, t7 FROM doris_test.extreme_test_multi_block;
INSERT INTO doris_test.extreme_test_multi_block (id, n1, n2, n3, n4, n5, n6, n7, n8, n9, tinyint_value1, smallint_value1, int_value1, bigint_value1, tinyint_value2, smallint_value2, int_value2, bigint_value2, country, city, address, name, remark, num1, num2, num4, t1, t2, t3, t4, t5, t6, t7) SELECT id, n1, n2, n3, n4, n5, n6, n7, n8, n9, tinyint_value1, smallint_value1, int_value1, bigint_value1, tinyint_value2, smallint_value2, int_value2, bigint_value2, country, city, address, name, '', num1, num2, num4, t1, t2, t3, t4, t5, t6, t7 FROM doris_test.extreme_test_multi_block;
INSERT INTO doris_test.extreme_test_multi_block (id, n1, n2, n3, n4, n5, n6, n7, n8, n9, tinyint_value1, smallint_value1, int_value1, bigint_value1, tinyint_value2, smallint_value2, int_value2, bigint_value2, country, city, address, name, remark, num1, num2, num4, t1, t2, t3, t4, t5, t6, t7) SELECT id, n1, n2, n3, n4, n5, n6, n7, n8, n9, tinyint_value1, smallint_value1, int_value1, bigint_value1, tinyint_value2, smallint_value2, int_value2, bigint_value2, country, city, address, name, '', num1, num2, num4, t1, t2, t3, t4, t5, t6, t7 FROM doris_test.extreme_test_multi_block;
INSERT INTO doris_test.extreme_test_multi_block (id, n1, n2, n3, n4, n5, n6, n7, n8, n9, tinyint_value1, smallint_value1, int_value1, bigint_value1, tinyint_value2, smallint_value2, int_value2, bigint_value2, country, city, address, name, remark, num1, num2, num4, t1, t2, t3, t4, t5, t6, t7) SELECT id, n1, n2, n3, n4, n5, n6, n7, n8, n9, tinyint_value1, smallint_value1, int_value1, bigint_value1, tinyint_value2, smallint_value2, int_value2, bigint_value2, country, city, address, name, '', num1, num2, num4, t1, t2, t3, t4, t5, t6, t7 FROM doris_test.extreme_test_multi_block;
INSERT INTO doris_test.extreme_test_multi_block (id, n1, n2, n3, n4, n5, n6, n7, n8, n9, tinyint_value1, smallint_value1, int_value1, bigint_value1, tinyint_value2, smallint_value2, int_value2, bigint_value2, country, city, address, name, remark, num1, num2, num4, t1, t2, t3, t4, t5, t6, t7) SELECT id, n1, n2, n3, n4, n5, n6, n7, n8, n9, tinyint_value1, smallint_value1, int_value1, bigint_value1, tinyint_value2, smallint_value2, int_value2, bigint_value2, country, city, address, name, '', num1, num2, num4, t1, t2, t3, t4, t5, t6, t7 FROM doris_test.extreme_test_multi_block;

INSERT INTO doris_test.extreme_test_multi_block (
id, n1, n2, n3, n4, n5, n6, n7, n8, n9,
tinyint_value1, smallint_value1, int_value1, bigint_value1,
tinyint_value2, smallint_value2, int_value2, bigint_value2,
country, city, address, name, remark,
num1, num2, num4,
t1, t2, t3, t4, t5, t6, t7
)
SELECT
id, n1, n2, n3, n4, n5, n6, n7, n8, n9,
tinyint_value1, smallint_value1, int_value1, bigint_value1,
tinyint_value2, smallint_value2, int_value2, bigint_value2,
country, city, address, name, '',
num1, num2, num4,
t1, t2, t3, t4, t5, t6, t7
FROM doris_test.extreme_test;

commit;
Original file line number Diff line number Diff line change
Expand Up @@ -356,3 +356,78 @@ create table doris_test.TEST_LOWER (
k2 char(100)
);

CREATE TABLE catalog_pg_test.extreme_test (
id SERIAL PRIMARY KEY,
-- Numeric types for testing extreme values
smallint_val smallint,
int_val integer,
bigint_val bigint,
decimal_val decimal(38,10),
real_val real,
double_val double precision,
-- Character types for testing string values
char_val char(1),
varchar_val varchar(65535),
text_val text,
-- Date and time types for testing temporal values
date_val date,
timestamp_val timestamp(6),
timestamptz_val timestamptz,
interval_val interval,
-- Boolean type for testing logical values
bool_val boolean,
-- Binary type for testing byte array values
bytea_val bytea,
-- Network address types for testing network values
inet_val inet,
cidr_val cidr,
macaddr_val macaddr,
-- JSON types for testing structured data
json_val json,
jsonb_val jsonb,
-- Geometric types for testing spatial data
point_val point,
line_val line,
circle_val circle,
-- UUID type for testing unique identifiers
uuid_val uuid
);


CREATE TABLE catalog_pg_test.extreme_test_multi_block (
id integer,
-- Numeric types for testing extreme values
smallint_val smallint,
int_val integer,
bigint_val bigint,
decimal_val decimal(38,10),
real_val real,
double_val double precision,
-- Character types for testing string values
char_val char(1),
varchar_val varchar(65535),
text_val text,
-- Date and time types for testing temporal values
date_val date,
timestamp_val timestamp(6),
timestamptz_val timestamptz,
interval_val interval,
-- Boolean type for testing logical values
bool_val boolean,
-- Binary type for testing byte array values
bytea_val bytea,
-- Network address types for testing network values
inet_val inet,
cidr_val cidr,
macaddr_val macaddr,
-- JSON types for testing structured data
json_val json,
jsonb_val jsonb,
-- Geometric types for testing spatial data
point_val point,
line_val line,
circle_val circle,
-- UUID type for testing unique identifiers
uuid_val uuid
);

Loading