Skip to content

Commit 42de02f

Browse files
committed
sea-results: refresh test fakes for the merged-kernel binding surface
Rebased onto the updated sea-execution. Updates StatementStub to the merged-kernel Statement surface (statementId + status accessors, sync schema()) and casts useSEA in the relocated tests/e2e/sea/results-e2e test. Pre-existing SeaOperationBackend neutral-type conformance remains a sea-results follow-up. Co-authored-by: Isaac
1 parent ff8c349 commit 42de02f

2 files changed

Lines changed: 25 additions & 2 deletions

File tree

tests/e2e/sea/results-e2e.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
import { expect } from 'chai';
1818
import { DBSQLClient } from '../../../lib';
19+
import { ConnectionOptions } from '../../../lib/contracts/IDBSQLClient';
20+
import { InternalConnectionOptions } from '../../../lib/contracts/InternalConnectionOptions';
1921

2022
// Integration suite: connect through both backends, run a probe query,
2123
// and assert byte-identical row output (the M0 parity gate). Requires
@@ -50,7 +52,7 @@ async function fetchProbeRows(useSEA: boolean, secrets: PecoSecrets): Promise<Ar
5052
path: secrets.path,
5153
token: secrets.token,
5254
useSEA,
53-
});
55+
} as ConnectionOptions & InternalConnectionOptions);
5456
try {
5557
const session = await client.openSession();
5658
try {

tests/unit/sea/SeaOperationBackend.test.ts

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,16 @@ class StatementStub {
5858
this.batches = [...batches];
5959
}
6060

61+
// Mirrors the kernel `Statement.statementId` getter.
62+
public readonly statementId = '01ef-fake-statement-id';
63+
6164
public async fetchNextBatch(): Promise<{ ipcBytes: Buffer } | null> {
6265
if (this.batches.length === 0) return null;
6366
return { ipcBytes: this.batches.shift() as Buffer };
6467
}
6568

66-
public async schema(): Promise<{ ipcBytes: Buffer }> {
69+
// schema() is synchronous on the merged-kernel binding.
70+
public schema(): { ipcBytes: Buffer } {
6771
return { ipcBytes: this.schemaIpc };
6872
}
6973

@@ -74,6 +78,23 @@ class StatementStub {
7478
public async close(): Promise<void> {
7579
this.closed = true;
7680
}
81+
82+
// Status accessors from the kernel's status-fields surface.
83+
public async numModifiedRows(): Promise<number | null> {
84+
return null;
85+
}
86+
87+
public async displayMessage(): Promise<string | null> {
88+
return null;
89+
}
90+
91+
public async diagnosticInfo(): Promise<string | null> {
92+
return null;
93+
}
94+
95+
public async errorDetailsJson(): Promise<string | null> {
96+
return null;
97+
}
7798
}
7899

79100
// Helper: attach `databricks.type_name` to a field so the SEA Thrift

0 commit comments

Comments
 (0)