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

Store SQL scripts for Java source test datasets #20955

Merged
merged 1 commit into from
Jan 3, 2023
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CREATE TABLE IF NOT EXISTS default.id_and_name (id INTEGER, name VARCHAR(200)) ENGINE = TinyLog;
INSERT INTO default.id_and_name (id, name) VALUES (1,'picard'), (2, 'crusher'), (3, 'vash');

CREATE TABLE IF NOT EXISTS default.starships (id INTEGER, name VARCHAR(200)) ENGINE = TinyLog;
INSERT INTO default.starships (id, name) VALUES (1,'enterprise-d'), (2, 'defiant'), (3, 'yamato');
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CREATE SCHEMA COCKROACHDB_BASIC;
CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy');

CREATE TABLE COCKROACHDB_BASIC.TEST_DATASET(id INTEGER PRIMARY KEY, test_column_11 character,test_column_12 character(8),test_column_13 varchar,test_column_14 character(12),test_column_15 date,test_column_16 float8,test_column_17 float,test_column_19 int,test_column_2 BIT(3),test_column_23 numeric,test_column_24 decimal,test_column_25 smallint,test_column_26 text,test_column_27 time,test_column_28 timetz,test_column_29 timestamp,test_column_3 bigint,test_column_8 boolean );

INSERT INTO COCKROACHDB_BASIC.TEST_DATASET VALUES (1, 'a', '{asb123}', 'a', 'a', '1999-01-08', '123', '123', -2147483648, B'101', '99999', '+inf', -32768, 'a', '04:05:06', '04:05:06Z', TIMESTAMP '2004-10-19 10:23:54', -9223372036854775808, true);
INSERT INTO COCKROACHDB_BASIC.TEST_DATASET VALUES (2, '*', '{asb12}', 'abc', 'abc', '1999-01-08', '1234567890.1234567', '1234567890.1234567', 2147483647, B'101', '99999', 999, 32767, 'abc', '04:05:06', '04:05:06Z', TIMESTAMP '2004-10-19 10:23:54.123456', 9223372036854775807, 'yes');
INSERT INTO COCKROACHDB_BASIC.TEST_DATASET VALUES (3, '*', '{asb12}', 'Миші йдуть на південь, не питай чому;', 'Миші йдуть;', '1999-01-08', 'infinity', 'infinity', 2147483647, B'101', '99999', '-inf', 32767, 'Миші йдуть;', '04:05:06', '04:05:06Z', TIMESTAMP '2004-10-19 10:23:54.123456', 0, '1');
INSERT INTO COCKROACHDB_BASIC.TEST_DATASET VALUES (4, '*', '{asb12}', '櫻花分店', '櫻花分店', '1999-01-08', '+infinity', '+infinity', 2147483647, B'101', '99999', '+infinity', 32767, '櫻花分店', '04:05:06', '04:05:06Z', TIMESTAMP '2004-10-19 10:23:54.123456', 0, false);
INSERT INTO COCKROACHDB_BASIC.TEST_DATASET VALUES (5, '*', '{asb12}', '', '', '1999-01-08', '+inf', '+inf', 2147483647, B'101', '99999', '-infinity', 32767, '', '04:05:06', '04:05:06Z', TIMESTAMP '2004-10-19 10:23:54.123456', 0, 'no');
INSERT INTO COCKROACHDB_BASIC.TEST_DATASET VALUES (6, '*', '{asb12}', '\xF0\x9F\x9A\x80', '', '1999-01-08', 'inf', 'inf', 2147483647, B'101', '99999', 'nan', 32767, '\xF0\x9F\x9A\x80', '04:05:06', '04:05:06Z', TIMESTAMP '2004-10-19 10:23:54.123456', 0, '0');
INSERT INTO COCKROACHDB_BASIC.TEST_DATASET VALUES (7, '*', '{asb12}', '\xF0\x9F\x9A\x80', '', '1999-01-08', '-inf', '-inf', 2147483647, B'101', '99999', 'nan', 32767, '\xF0\x9F\x9A\x80', '04:05:06', '04:05:06Z', TIMESTAMP '2004-10-19 10:23:54.123456', 0, '0');
INSERT INTO COCKROACHDB_BASIC.TEST_DATASET VALUES (8, '*', '{asb12}', '\xF0\x9F\x9A\x80', '', '1999-01-08', '-infinity', '-infinity', 2147483647, B'101', '99999', 'nan', 32767, '\xF0\x9F\x9A\x80', '04:05:06', '04:05:06Z', TIMESTAMP '2004-10-19 10:23:54.123456', 0, '0');
INSERT INTO COCKROACHDB_BASIC.TEST_DATASET VALUES (9, '*', '{asb12}', '\xF0\x9F\x9A\x80', '', '1999-01-08', 'nan', 'nan', 2147483647, B'101', '99999', 'nan', 32767, '\xF0\x9F\x9A\x80', '04:05:06', '04:05:06Z', TIMESTAMP '2004-10-19 10:23:54.123456', 0, '0');
INSERT INTO COCKROACHDB_BASIC.TEST_DATASET VALUES (10, '*', '{asb12}', '\xF0\x9F\x9A\x80', '', '1999-01-08', 'nan', 'nan', 2147483647, B'101', '99999', 'nan', 32767, '\xF0\x9F\x9A\x80', '04:05:06', '04:05:06Z', TIMESTAMP '2004-10-19 10:23:54.123456', 0, '0');
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CREATE SCHEMA COCKROACHDB_FULL;
CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy');

CREATE TABLE COCKROACHDB_FULL.TEST_DATASET(id INTEGER PRIMARY KEY, test_column_1 STRING[],test_column_10 blob,test_column_11 character,test_column_12 character(8),test_column_13 varchar,test_column_14 character(12),test_column_15 date,test_column_16 float8,test_column_17 float,test_column_18 inet,test_column_19 int,test_column_2 BIT(3),test_column_20 interval,test_column_21 json,test_column_22 jsonb,test_column_23 numeric,test_column_24 decimal,test_column_25 smallint,test_column_26 text,test_column_27 time,test_column_28 timetz,test_column_29 timestamp,test_column_3 bigint,test_column_30 uuid,test_column_31 mood,test_column_32 text[],test_column_33 int[],test_column_4 bigserial,test_column_5 serial,test_column_6 smallserial,test_column_7 BIT VARYING(5),test_column_8 boolean,test_column_9 bytea[] );

INSERT INTO COCKROACHDB_FULL.TEST_DATASET VALUES (1, ARRAY['sky', 'road', 'car'], decode('1234', 'hex'), 'a', '{asb123}', 'a', 'a', '1999-01-08', '123', '123', '198.24.10.0/24', null, B'101', null, null, null, '99999', '+inf', null, 'a', '04:05:06', '04:05:06Z', TIMESTAMP '2004-10-19 10:23:54', -9223372036854775808, 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', 'happy', '{10000, 10000, 10000, 10000}', '{10000, 10000, 10000, 10000}', 1, 1, 1, B'101', true, ARRAY['☃'::bytes, 'ї'::bytes]);
INSERT INTO COCKROACHDB_FULL.TEST_DATASET VALUES (2, null, null, '*', '{asb12}', 'abc', 'abc', null, '1234567890.1234567', '1234567890.1234567', '198.24.10.0', -2147483648, null, 'P1Y2M3DT4H5M6S', '{"a": 10, "b": 15}', '[1, 2, 3]'::jsonb, null, 999, -32768, 'abc', null, null, TIMESTAMP '2004-10-19 10:23:54.123456', 9223372036854775807, null, null, null, null, 9223372036854775807, 2147483647, 32767, null, 'yes', null);
INSERT INTO COCKROACHDB_FULL.TEST_DATASET VALUES (3, null, null, null, null, 'Миші йдуть на південь, не питай чому;', 'Миші йдуть;', null, null, null, '198.10/8', 2147483647, null, '-178000000', null, null, null, '-inf', 32767, 'Миші йдуть;', null, null, null, 0, null, null, null, null, 0, 0, 0, null, '1', null);
INSERT INTO COCKROACHDB_FULL.TEST_DATASET VALUES (4, null, null, null, null, '櫻花分店', '櫻花分店', null, 'infinity', 'infinity', null, null, null, '178000000', null, null, null, '+infinity', null, '櫻花分店', null, null, null, null, null, null, null, null, -9223372036854775808, -2147483647, -32767, null, false, null);
INSERT INTO COCKROACHDB_FULL.TEST_DATASET VALUES (5, null, null, null, null, '', '', null, '+infinity', '+infinity', null, null, null, null, null, null, null, '-infinity', null, '', null, null, null, null, null, null, null, null, null, null, null, null, 'no', null);
INSERT INTO COCKROACHDB_FULL.TEST_DATASET VALUES (6, null, null, null, null, null, null, null, '+inf', '+inf', null, null, null, null, null, null, null, 'nan', null, null, null, null, null, null, null, null, null, null, null, null, null, null, '0', null);
INSERT INTO COCKROACHDB_FULL.TEST_DATASET VALUES (7, null, null, null, null, '\xF0\x9F\x9A\x80', null, null, 'inf', 'inf', null, null, null, null, null, null, null, null, null, '\xF0\x9F\x9A\x80', null, null, null, null, null, null, null, null, null, null, null, null, null, null);
INSERT INTO COCKROACHDB_FULL.TEST_DATASET VALUES (8, null, null, null, null, null, null, null, '-inf', '-inf', 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 COCKROACHDB_FULL.TEST_DATASET VALUES (9, null, null, null, null, null, null, null, '-infinity', '-infinity', 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 COCKROACHDB_FULL.TEST_DATASET VALUES (10, null, null, null, null, null, null, null, 'nan', 'nan', null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CREATE SCHEMA COCKROACHDB_FULL_NN;
CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy');

CREATE TABLE COCKROACHDB_FULL_NN.TEST_DATASET(id INTEGER PRIMARY KEY, test_column_1 STRING[],test_column_10 blob,test_column_11 character,test_column_12 character(8),test_column_13 varchar,test_column_14 character(12),test_column_15 date,test_column_16 float8,test_column_17 float,test_column_18 inet,test_column_19 int,test_column_2 BIT(3),test_column_20 interval,test_column_21 json,test_column_22 jsonb,test_column_23 numeric,test_column_24 decimal,test_column_25 smallint,test_column_26 text,test_column_27 time,test_column_28 timetz,test_column_29 timestamp,test_column_3 bigint,test_column_30 uuid,test_column_31 mood,test_column_32 text[],test_column_33 int[],test_column_4 bigserial,test_column_5 serial,test_column_6 smallserial,test_column_7 BIT VARYING(5),test_column_8 boolean,test_column_9 bytea[] );

INSERT INTO COCKROACHDB_FULL_NN.TEST_DATASET VALUES (1, ARRAY['sky', 'road', 'car'], decode('1234', 'hex'), 'a', '{asb123}', 'a', 'a', '1999-01-08', '123', '123', '198.24.10.0/24', -2147483648, B'101', 'P1Y2M3DT4H5M6S', '{"a": 10, "b": 15}', '[1, 2, 3]'::jsonb, '99999', '+inf', -32768, 'a', '04:05:06', '04:05:06Z', TIMESTAMP '2004-10-19 10:23:54', -9223372036854775808, 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', 'happy', '{10000, 10000, 10000, 10000}', '{10000, 10000, 10000, 10000}', 1, 1, 1, B'101', true, ARRAY['☃'::bytes, 'ї'::bytes]);
INSERT INTO COCKROACHDB_FULL_NN.TEST_DATASET VALUES (2, ARRAY['sky', 'road', 'car'], decode('1234', 'hex'), '*', '{asb12}', 'abc', 'abc', '1999-01-08', '1234567890.1234567', '1234567890.1234567', '198.24.10.0', 2147483647, B'101', '-178000000', '{"a": 10, "b": 15}', '[1, 2, 3]'::jsonb, '99999', 999, 32767, 'abc', '04:05:06', '04:05:06Z', TIMESTAMP '2004-10-19 10:23:54.123456', 9223372036854775807, 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', 'happy', '{10000, 10000, 10000, 10000}', '{10000, 10000, 10000, 10000}', 9223372036854775807, 2147483647, 32767, B'101', 'yes', ARRAY['☃'::bytes, 'ї'::bytes]);
INSERT INTO COCKROACHDB_FULL_NN.TEST_DATASET VALUES (3, ARRAY['sky', 'road', 'car'], decode('1234', 'hex'), '*', '{asb12}', 'Миші йдуть на південь, не питай чому;', 'Миші йдуть;', '1999-01-08', 'infinity', 'infinity', '198.10/8', 2147483647, B'101', '178000000', '{"a": 10, "b": 15}', '[1, 2, 3]'::jsonb, '99999', '-inf', 32767, 'Миші йдуть;', '04:05:06', '04:05:06Z', TIMESTAMP '2004-10-19 10:23:54.123456', 0, 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', 'happy', '{10000, 10000, 10000, 10000}', '{10000, 10000, 10000, 10000}', 0, 0, 0, B'101', '1', ARRAY['☃'::bytes, 'ї'::bytes]);
INSERT INTO COCKROACHDB_FULL_NN.TEST_DATASET VALUES (4, ARRAY['sky', 'road', 'car'], decode('1234', 'hex'), '*', '{asb12}', '櫻花分店', '櫻花分店', '1999-01-08', '+infinity', '+infinity', '198.10/8', 2147483647, B'101', '178000000', '{"a": 10, "b": 15}', '[1, 2, 3]'::jsonb, '99999', '+infinity', 32767, '櫻花分店', '04:05:06', '04:05:06Z', TIMESTAMP '2004-10-19 10:23:54.123456', 0, 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', 'happy', '{10000, 10000, 10000, 10000}', '{10000, 10000, 10000, 10000}', -9223372036854775808, -2147483647, -32767, B'101', false, ARRAY['☃'::bytes, 'ї'::bytes]);
INSERT INTO COCKROACHDB_FULL_NN.TEST_DATASET VALUES (5, ARRAY['sky', 'road', 'car'], decode('1234', 'hex'), '*', '{asb12}', '', '', '1999-01-08', '+inf', '+inf', '198.10/8', 2147483647, B'101', '178000000', '{"a": 10, "b": 15}', '[1, 2, 3]'::jsonb, '99999', '-infinity', 32767, '', '04:05:06', '04:05:06Z', TIMESTAMP '2004-10-19 10:23:54.123456', 0, 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', 'happy', '{10000, 10000, 10000, 10000}', '{10000, 10000, 10000, 10000}', -9223372036854775808, -2147483647, -32767, B'101', 'no', ARRAY['☃'::bytes, 'ї'::bytes]);
INSERT INTO COCKROACHDB_FULL_NN.TEST_DATASET VALUES (6, ARRAY['sky', 'road', 'car'], decode('1234', 'hex'), '*', '{asb12}', '\xF0\x9F\x9A\x80', '', '1999-01-08', 'inf', 'inf', '198.10/8', 2147483647, B'101', '178000000', '{"a": 10, "b": 15}', '[1, 2, 3]'::jsonb, '99999', 'nan', 32767, '\xF0\x9F\x9A\x80', '04:05:06', '04:05:06Z', TIMESTAMP '2004-10-19 10:23:54.123456', 0, 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', 'happy', '{10000, 10000, 10000, 10000}', '{10000, 10000, 10000, 10000}', -9223372036854775808, -2147483647, -32767, B'101', '0', ARRAY['☃'::bytes, 'ї'::bytes]);
INSERT INTO COCKROACHDB_FULL_NN.TEST_DATASET VALUES (7, ARRAY['sky', 'road', 'car'], decode('1234', 'hex'), '*', '{asb12}', '\xF0\x9F\x9A\x80', '', '1999-01-08', '-inf', '-inf', '198.10/8', 2147483647, B'101', '178000000', '{"a": 10, "b": 15}', '[1, 2, 3]'::jsonb, '99999', 'nan', 32767, '\xF0\x9F\x9A\x80', '04:05:06', '04:05:06Z', TIMESTAMP '2004-10-19 10:23:54.123456', 0, 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', 'happy', '{10000, 10000, 10000, 10000}', '{10000, 10000, 10000, 10000}', -9223372036854775808, -2147483647, -32767, B'101', '0', ARRAY['☃'::bytes, 'ї'::bytes]);
INSERT INTO COCKROACHDB_FULL_NN.TEST_DATASET VALUES (8, ARRAY['sky', 'road', 'car'], decode('1234', 'hex'), '*', '{asb12}', '\xF0\x9F\x9A\x80', '', '1999-01-08', '-infinity', '-infinity', '198.10/8', 2147483647, B'101', '178000000', '{"a": 10, "b": 15}', '[1, 2, 3]'::jsonb, '99999', 'nan', 32767, '\xF0\x9F\x9A\x80', '04:05:06', '04:05:06Z', TIMESTAMP '2004-10-19 10:23:54.123456', 0, 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', 'happy', '{10000, 10000, 10000, 10000}', '{10000, 10000, 10000, 10000}', -9223372036854775808, -2147483647, -32767, B'101', '0', ARRAY['☃'::bytes, 'ї'::bytes]);
INSERT INTO COCKROACHDB_FULL_NN.TEST_DATASET VALUES (9, ARRAY['sky', 'road', 'car'], decode('1234', 'hex'), '*', '{asb12}', '\xF0\x9F\x9A\x80', '', '1999-01-08', 'nan', 'nan', '198.10/8', 2147483647, B'101', '178000000', '{"a": 10, "b": 15}', '[1, 2, 3]'::jsonb, '99999', 'nan', 32767, '\xF0\x9F\x9A\x80', '04:05:06', '04:05:06Z', TIMESTAMP '2004-10-19 10:23:54.123456', 0, 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', 'happy', '{10000, 10000, 10000, 10000}', '{10000, 10000, 10000, 10000}', -9223372036854775808, -2147483647, -32767, B'101', '0', ARRAY['☃'::bytes, 'ї'::bytes]);
INSERT INTO COCKROACHDB_FULL_NN.TEST_DATASET VALUES (10, ARRAY['sky', 'road', 'car'], decode('1234', 'hex'), '*', '{asb12}', '\xF0\x9F\x9A\x80', '', '1999-01-08', 'nan', 'nan', '198.10/8', 2147483647, B'101', '178000000', '{"a": 10, "b": 15}', '[1, 2, 3]'::jsonb, '99999', 'nan', 32767, '\xF0\x9F\x9A\x80', '04:05:06', '04:05:06Z', TIMESTAMP '2004-10-19 10:23:54.123456', 0, 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11', 'happy', '{10000, 10000, 10000, 10000}', '{10000, 10000, 10000, 10000}', -9223372036854775808, -2147483647, -32767, B'101', '0', ARRAY['☃'::bytes, 'ї'::bytes]);
Loading