Skip to content

Commit 9107a4f

Browse files
authored
test: Fix nullability test in struct (#134)
1 parent 16c9a50 commit 9107a4f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/integration/v2/fetchTypes.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,15 @@ describe("test type casting on fetch", () => {
107107
engineName: process.env.FIREBOLT_ENGINE_NAME as string
108108
});
109109
await connection.execute("SET advanced_mode=1");
110-
await connection.execute("SET enable_struct=1");
111110
await connection.execute("SET enable_create_table_v2=true");
112-
await connection.execute("SET enable_row_selection=true");
111+
await connection.execute("SET enable_struct_syntax=true");
113112
await connection.execute("SET prevent_create_on_information_schema=true");
114113
await connection.execute("SET enable_create_table_with_struct_type=true");
115114
await connection.execute("DROP TABLE IF EXISTS test_struct");
116115
await connection.execute("DROP TABLE IF EXISTS test_struct_helper");
117116
try {
118117
await connection.execute(
119-
"CREATE TABLE IF NOT EXISTS test_struct(id int not null, s struct(a array(int) not null, b bytea null) not null)"
118+
"CREATE TABLE IF NOT EXISTS test_struct(id int not null, s struct(a array(int) null, b bytea null) not null)"
120119
);
121120
await connection.execute(
122121
"CREATE TABLE IF NOT EXISTS test_struct_helper(a array(int) not null, b bytea null)"
@@ -140,7 +139,7 @@ describe("test type casting on fetch", () => {
140139

141140
const { data, meta } = await statement.fetchResult();
142141
expect(meta[0].type).toEqual(
143-
"struct(id int, s struct(a array(int null), b bytea null))"
142+
"struct(id int, s struct(a array(int null) null, b bytea null))"
144143
);
145144
const row = data[0];
146145
expect((row as unknown[])[0]).toEqual({

0 commit comments

Comments
 (0)