From 6f8712e53a4993514316970b4e59f3fcd4e466a2 Mon Sep 17 00:00:00 2001 From: ptiurin Date: Thu, 27 Feb 2025 09:29:25 +0000 Subject: [PATCH 1/2] test: Fix nullability test in struct --- test/integration/v2/fetchTypes.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/v2/fetchTypes.test.ts b/test/integration/v2/fetchTypes.test.ts index 8e817f95..fef88981 100644 --- a/test/integration/v2/fetchTypes.test.ts +++ b/test/integration/v2/fetchTypes.test.ts @@ -116,7 +116,7 @@ describe("test type casting on fetch", () => { await connection.execute("DROP TABLE IF EXISTS test_struct_helper"); try { await connection.execute( - "CREATE TABLE IF NOT EXISTS test_struct(id int not null, s struct(a array(int) not null, b bytea null) not null)" + "CREATE TABLE IF NOT EXISTS test_struct(id int not null, s struct(a array(int) null, b bytea null) not null)" ); await connection.execute( "CREATE TABLE IF NOT EXISTS test_struct_helper(a array(int) not null, b bytea null)" From 2afc955d6ba2ee5b925dad8ee44be9fc0a73d9bb Mon Sep 17 00:00:00 2001 From: ptiurin Date: Thu, 27 Feb 2025 09:48:47 +0000 Subject: [PATCH 2/2] fix struct flags --- test/integration/v2/fetchTypes.test.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/integration/v2/fetchTypes.test.ts b/test/integration/v2/fetchTypes.test.ts index fef88981..71638117 100644 --- a/test/integration/v2/fetchTypes.test.ts +++ b/test/integration/v2/fetchTypes.test.ts @@ -107,9 +107,8 @@ describe("test type casting on fetch", () => { engineName: process.env.FIREBOLT_ENGINE_NAME as string }); await connection.execute("SET advanced_mode=1"); - await connection.execute("SET enable_struct=1"); await connection.execute("SET enable_create_table_v2=true"); - await connection.execute("SET enable_row_selection=true"); + await connection.execute("SET enable_struct_syntax=true"); await connection.execute("SET prevent_create_on_information_schema=true"); await connection.execute("SET enable_create_table_with_struct_type=true"); await connection.execute("DROP TABLE IF EXISTS test_struct"); @@ -140,7 +139,7 @@ describe("test type casting on fetch", () => { const { data, meta } = await statement.fetchResult(); expect(meta[0].type).toEqual( - "struct(id int, s struct(a array(int null), b bytea null))" + "struct(id int, s struct(a array(int null) null, b bytea null))" ); const row = data[0]; expect((row as unknown[])[0]).toEqual({