From f397a69e24f2b9ee52cf995ecbadab900988905c Mon Sep 17 00:00:00 2001 From: Vu Anh Phung Date: Wed, 23 Sep 2026 20:19:38 +0000 Subject: [PATCH 1/2] test: use supported kernel session timezone Signed-off-by: Vu Anh Phung --- tests/e2e/kernel/execution-e2e.test.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/e2e/kernel/execution-e2e.test.ts b/tests/e2e/kernel/execution-e2e.test.ts index 8ef9d803..c4d1d37b 100644 --- a/tests/e2e/kernel/execution-e2e.test.ts +++ b/tests/e2e/kernel/execution-e2e.test.ts @@ -93,7 +93,7 @@ describe('kernel execution end-to-end', function e2eSuite() { await client.close(); }); - it('passes sessionConfig (Spark conf) through openSession.configuration', async () => { + it('passes session configuration through openSession.configuration', async () => { const client = new DBSQLClient(); await client.connect({ @@ -103,19 +103,17 @@ describe('kernel execution end-to-end', function e2eSuite() { useKernel: true, } as ConnectionOptions & InternalConnectionOptions); - // Sanity-check that supplying session-level Spark conf does not - // break openSession. The SEA wire applies these as `parameters` on - // every executeStatement; we don't observe them in the response - // for M0, but the absence of an error proves the napi binding - // accepts and forwards the map. + // Use a supported SQL session parameter and verify that it affects + // statement execution, proving the napi binding forwards the map. const session = await client.openSession({ initialCatalog: 'main', configuration: { - 'spark.sql.session.timeZone': 'UTC', + TIMEZONE: 'America/Los_Angeles', }, }); - const operation = await session.executeStatement('SELECT 1', {}); + const operation = await session.executeStatement('SELECT current_timezone() AS timezone', {}); + expect(await operation.fetchAll()).to.deep.equal([{ timezone: 'America/Los_Angeles' }]); await operation.close(); await session.close(); From 94abe165f21969e75bd283862e1dc1cdf346566f Mon Sep 17 00:00:00 2001 From: Vu Anh Phung Date: Wed, 23 Sep 2026 20:28:05 +0000 Subject: [PATCH 2/2] test: clean up timezone assertion resources Signed-off-by: Vu Anh Phung --- tests/e2e/kernel/execution-e2e.test.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/e2e/kernel/execution-e2e.test.ts b/tests/e2e/kernel/execution-e2e.test.ts index c4d1d37b..772a53a5 100644 --- a/tests/e2e/kernel/execution-e2e.test.ts +++ b/tests/e2e/kernel/execution-e2e.test.ts @@ -112,12 +112,15 @@ describe('kernel execution end-to-end', function e2eSuite() { }, }); - const operation = await session.executeStatement('SELECT current_timezone() AS timezone', {}); - expect(await operation.fetchAll()).to.deep.equal([{ timezone: 'America/Los_Angeles' }]); - await operation.close(); - - await session.close(); - await client.close(); + let operation; + try { + operation = await session.executeStatement('SELECT current_timezone() AS timezone', {}); + expect(await operation.fetchAll()).to.deep.equal([{ timezone: 'America/Los_Angeles' }]); + } finally { + await operation?.close(); + await session.close(); + await client.close(); + } }); it('binds ordinary positional parameters through rawParams', async () => {