@@ -44,6 +44,106 @@ set -ex
4444 (1, 2),
4545 (10, 20);
4646 COMMIT;
47+
48+ CREATE TABLE primitive_types_NATIVE (
49+ col_00_id Int32,
50+ col_01_bool Bool,
51+ col_02_int8 Int8,
52+ col_03_int16 Int16,
53+ col_04_int32 Int32,
54+ col_05_int64 Int64,
55+ col_06_uint8 Uint8,
56+ col_07_uint16 Uint16,
57+ col_08_uint32 Uint32,
58+ col_09_uint64 Uint64,
59+ col_10_float Float,
60+ col_11_double Double,
61+ col_12_string String,
62+ col_13_utf8 Utf8,
63+ col_14_date Date,
64+ col_15_datetime Datetime,
65+ col_16_timestamp Timestamp,
66+ PRIMARY KEY (col_00_id)
67+ );
68+ COMMIT;
69+ INSERT INTO
70+ primitive_types_NATIVE
71+ (col_00_id, col_01_bool, col_02_int8, col_03_int16, col_04_int32, col_05_int64, col_06_uint8,
72+ col_07_uint16, col_08_uint32, col_09_uint64, col_10_float, col_11_double, col_12_string,
73+ col_13_utf8, col_14_date, col_15_datetime, col_16_timestamp)
74+ VALUES (1, false, 2, 3, 4, 5, 6, 7, 8, 9, 10.10f, 11.11f, "аз", "az",
75+ Date("1988-11-20"), Datetime("1988-11-20T12:55:28Z"), Timestamp("1988-11-20T12:55:28.111Z")),
76+ (2, true, -2, -3, -4, -5, 6, 7, 8, 9, -10.10f, -11.11f, "буки", "buki",
77+ Date("2024-05-27"), Datetime("2024-05-27T18:43:32Z"), Timestamp("2024-05-27T18:43:32.123456Z"));
78+ COMMIT;
79+
80+ CREATE TABLE optional_types_NATIVE (
81+ col_00_id Int32 NOT NULL,
82+ col_01_bool Bool,
83+ col_02_int8 Int8,
84+ col_03_int16 Int16,
85+ col_04_int32 Int32,
86+ col_05_int64 Int64,
87+ col_06_uint8 Uint8,
88+ col_07_uint16 Uint16,
89+ col_08_uint32 Uint32,
90+ col_09_uint64 Uint64,
91+ col_10_float Float,
92+ col_11_double Double,
93+ col_12_string String,
94+ col_13_utf8 Utf8,
95+ col_14_date Date,
96+ col_15_datetime Datetime,
97+ col_16_timestamp Timestamp,
98+ PRIMARY KEY (col_00_id)
99+ );
100+ COMMIT;
101+ INSERT INTO
102+ optional_types_NATIVE
103+ (col_00_id, col_01_bool, col_02_int8, col_03_int16, col_04_int32, col_05_int64, col_06_uint8,
104+ col_07_uint16, col_08_uint32, col_09_uint64, col_10_float, col_11_double, col_12_string,
105+ col_13_utf8, col_14_date, col_15_datetime, col_16_timestamp)
106+ VALUES (1, false, 2, 3, 4, 5, 6, 7, 8, 9, 10.10f, 11.11f, "аз", "az",
107+ Date("1988-11-20"), Datetime("1988-11-20T12:55:28Z"), Timestamp("1988-11-20T12:55:28.111Z")),
108+ (2, true, -2, -3, -4, -5, 6, 7, 8, 9, -10.10f, -11.11f, "буки", "buki",
109+ Date("2024-05-27"), Datetime("2024-05-27T18:43:32Z"), Timestamp("2024-05-27T18:43:32.123456Z")),
110+ (3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
111+ NULL, NULL, NULL);
112+ COMMIT;
113+
114+ CREATE TABLE constant_NATIVE (col_00_id Int32 NOT NULL, PRIMARY KEY (col_00_id));
115+ COMMIT;
116+ INSERT INTO constant_NATIVE (col_00_id) VALUES
117+ (1),
118+ (2),
119+ (3);
120+ COMMIT;
121+
122+ CREATE TABLE count_NATIVE (col_00_id Int32 NOT NULL, PRIMARY KEY (col_00_id));
123+ COMMIT;
124+ INSERT INTO count_NATIVE (col_00_id) VALUES
125+ (1),
126+ (2),
127+ (3),
128+ (4);
129+ COMMIT;
130+
131+ CREATE TABLE pushdown_NATIVE (col_00_id Int32 NOT NULL, col_01_string String, PRIMARY KEY (col_00_id));
132+ COMMIT;
133+ INSERT INTO pushdown_NATIVE (col_00_id, col_01_string) VALUES
134+ (1, "one"),
135+ (2, "two"),
136+ (3, "three");
137+ COMMIT;
138+
139+ -- As of 2024.05.31, INTERVAL type is not supported, so we use it to check behavior of connector
140+ -- when reading table containing usupported type columns.
141+ CREATE TABLE unsupported_types_NATIVE (col_00_id Int32 NOT NULL, col_01_interval INTERVAL, PRIMARY KEY (col_00_id));
142+ COMMIT;
143+ INSERT INTO unsupported_types_NATIVE (col_00_id, col_01_interval) VALUES
144+ (1, DATE("2024-01-01") - DATE("2023-01-01")),
145+ (2, DATE("2022-01-01") - DATE("2023-01-01"));
146+ COMMIT;
47147 '
48148
49149echo $( date +" %T.%6N" ) " SUCCESS"
0 commit comments