Skip to content

Commit 1266b01

Browse files
Add end-to-end tests to verify data type support when migrating from PostgreSQL (#1251)
* Add end-to-end tests to check that table interleave limits are adhered to when migrating from Postgres * Add end-to-end tests for verify data type support when migrating from PostgreSQL --------- Co-authored-by: Vardhan Vinay Thigle <39047439+VardhanThigle@users.noreply.github.com>
1 parent d00573f commit 1266b01

File tree

3 files changed

+346
-0
lines changed

3 files changed

+346
-0
lines changed

.github/workflows/integration-tests-against-emulator.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ jobs:
108108
sudo apt-get -yq install postgresql-client
109109
- run: psql --version
110110
- run: psql -f test_data/pg_dump.test.out
111+
- run: psql -c 'CREATE DATABASE test_pg_data_types;'
112+
- run: psql -d test_pg_data_types -f test_data/postgres_data_types_dump.test.out
111113

112114
# init a MySQL database from the test_data
113115
- run: mysql --version
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
DROP TABLE IF EXISTS all_data_types;
2+
CREATE TABLE all_data_types (
3+
row_id BIGINT PRIMARY KEY,
4+
bit_to_bytes BIT,
5+
bit_to_bool_array BIT,
6+
bit_to_string BIT,
7+
bit_n_to_bytes BIT(32),
8+
bit_n_to_bool_array BIT(32),
9+
bit_n_to_string BIT(32),
10+
bit_varying_to_bytes BIT VARYING,
11+
bit_varying_to_bool_array BIT VARYING,
12+
bit_varying_to_string BIT VARYING,
13+
bit_varying_n_to_bytes BIT VARYING(32),
14+
bit_varying_n_to_bool_array BIT VARYING(32),
15+
bit_varying_n_to_string BIT VARYING(32),
16+
varbit_to_bytes VARBIT,
17+
varbit_to_bool_array VARBIT,
18+
varbit_to_string VARBIT,
19+
varbit_n_to_bytes VARBIT(32),
20+
varbit_n_to_bool_array VARBIT(32),
21+
varbit_n_to_string VARBIT(32),
22+
bool_to_bool BOOL,
23+
bool_to_string BOOL,
24+
bool_array_to_bool_array BOOL[],
25+
bool_array_to_string BOOL[],
26+
boolean_to_bool BOOLEAN,
27+
boolean_to_string BOOLEAN,
28+
smallint_to_int64 SMALLINT,
29+
smallint_to_string SMALLINT,
30+
smallint_array_to_int64_array SMALLINT[],
31+
smallint_array_to_string SMALLINT[],
32+
int2_to_int64 INT2,
33+
int2_to_string INT2,
34+
int_to_int64 INT,
35+
int_to_string INT,
36+
int_array_to_int64_array INT[],
37+
int_array_to_string INT[],
38+
int4_to_int64 INT4,
39+
int4_to_string INT4,
40+
integer_to_int64 INTEGER,
41+
integer_to_string INTEGER,
42+
bigint_to_int64 BIGINT,
43+
bigint_to_string BIGINT,
44+
bigint_array_to_int64_array BIGINT[],
45+
bigint_array_to_string BIGINT[],
46+
int8_to_int64 INT8,
47+
int8_to_string INT8,
48+
smallserial_to_int64 SMALLSERIAL,
49+
smallserial_to_string SMALLSERIAL,
50+
serial2_to_int64 SERIAL2,
51+
serial2_to_string SERIAL2,
52+
serial_to_int64 SERIAL,
53+
serial_to_string SERIAL,
54+
serial4_to_int64 SERIAL4,
55+
serial4_to_string SERIAL4,
56+
bigserial_to_int64 BIGSERIAL,
57+
bigserial_to_string BIGSERIAL,
58+
serial8_to_int64 SERIAL8,
59+
serial8_to_string SERIAL8,
60+
decimal_to_numeric DECIMAL(20, 5),
61+
decimal_to_string DECIMAL(20, 5),
62+
numeric_to_numeric NUMERIC(20, 5),
63+
numeric_to_string NUMERIC(20, 5),
64+
large_decimal_to_numeric DECIMAL(40, 10),
65+
large_decimal_to_string DECIMAL(40, 10),
66+
large_numeric_to_numeric NUMERIC(40, 10),
67+
large_numeric_to_string NUMERIC(40, 10),
68+
float4_to_float32 FLOAT4,
69+
float4_to_float64 FLOAT4,
70+
float4_to_string FLOAT4,
71+
real_to_float32 REAL,
72+
real_to_float64 REAL,
73+
real_to_string REAL,
74+
real_array_to_float32_array REAL[],
75+
real_array_to_string REAL[],
76+
double_precision_to_float64 DOUBLE PRECISION,
77+
double_precision_to_string DOUBLE PRECISION,
78+
float_to_float64 FLOAT,
79+
float_to_string FLOAT,
80+
float_array_to_float64_array FLOAT[],
81+
float_array_to_string FLOAT[],
82+
float8_to_float64 FLOAT8,
83+
float8_to_string FLOAT8,
84+
date_to_date DATE,
85+
date_to_string DATE,
86+
timestamp_to_timestamp TIMESTAMP,
87+
timestamp_to_string TIMESTAMP,
88+
timestamp_with_timezone_to_timestamp TIMESTAMP WITH TIME ZONE,
89+
timestamp_with_timezone_to_string TIMESTAMP WITH TIME ZONE,
90+
timestamptz_to_timestamp TIMESTAMPTZ,
91+
timestamptz_to_string TIMESTAMPTZ,
92+
time_to_string TIME,
93+
time_with_timezone_to_string TIME WITH TIME ZONE,
94+
timetz_to_string TIMETZ,
95+
char_to_string CHAR,
96+
char_n_to_string CHAR(255),
97+
character_to_string CHARACTER,
98+
character_n_to_string CHARACTER(255),
99+
varchar_to_string VARCHAR,
100+
varchar_n_to_string VARCHAR(255),
101+
character_varying_to_string CHARACTER VARYING,
102+
character_varying_n_to_string CHARACTER VARYING(255),
103+
text_to_string TEXT,
104+
bytea_to_bytes BYTEA,
105+
bytea_to_string BYTEA,
106+
json_to_json JSON,
107+
json_to_string JSON,
108+
jsonb_to_json JSONB,
109+
jsonb_to_string JSONB,
110+
interval_to_int64 INTERVAL,
111+
interval_to_string INTERVAL,
112+
box_to_string BOX,
113+
box_to_float64_array BOX,
114+
circle_to_string CIRCLE,
115+
circle_to_float64_array CIRCLE,
116+
line_to_string LINE,
117+
line_to_float64_array LINE,
118+
lseg_to_string LSEG,
119+
lseg_to_float64_array LSEG,
120+
path_to_string PATH,
121+
path_to_float64_array PATH,
122+
point_to_string POINT,
123+
point_to_float64_array POINT,
124+
polygon_to_string POLYGON,
125+
polygon_to_float64_array POLYGON,
126+
money_to_int64 MONEY,
127+
money_to_string MONEY,
128+
uuid_to_bytes UUID,
129+
uuid_to_string UUID,
130+
xml_to_string XML,
131+
cidr_to_string CIDR,
132+
inet_to_string INET,
133+
macaddr_to_string MACADDR
134+
);

0 commit comments

Comments
 (0)