Skip to content

Commit e4e6bcf

Browse files
committed
Restore Thrift result-handler compatibility hooks
Keep existing e2e-only inspection hooks available through the facade while the new backend abstraction owns result handling. Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
1 parent 0e802ec commit e4e6bcf

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

lib/DBSQLOperation.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ export default class DBSQLOperation implements IOperation {
5555

5656
private cancelled: boolean = false;
5757

58+
public readonly _data?: unknown;
59+
5860
private metadata?: ResultMetadata;
5961

6062
private startTime: number = Date.now();
@@ -66,6 +68,7 @@ export default class DBSQLOperation implements IOperation {
6668
constructor(options: DBSQLOperationConstructorOptions) {
6769
this.context = options.context;
6870
this.backend = options.backend;
71+
this._data = options.backend.dataProvider;
6972
this.sessionId = options.sessionId;
7073
this.context.getLogger().log(LogLevel.debug, `Operation created with id: ${this.id}`);
7174

lib/contracts/IOperationBackend.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ export default interface IOperationBackend {
3636
/** Optional Thrift operation type used for statement telemetry classification. */
3737
readonly operationType?: TOperationType;
3838

39+
/**
40+
* Optional raw data provider exposed only for legacy tests that inspect
41+
* result-handler internals. Not part of the public operation contract.
42+
*/
43+
readonly dataProvider?: unknown;
44+
3945
/**
4046
* Whether this operation has a result set.
4147
*

lib/thrift-backend/ThriftOperationBackend.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ export default class ThriftOperationBackend implements IOperationBackend {
121121
return this.operationHandle.operationType;
122122
}
123123

124+
public get dataProvider() {
125+
return this._data;
126+
}
127+
124128
public hasResultSet(): boolean {
125129
return Boolean(this.operationHandle.hasResultSet);
126130
}

0 commit comments

Comments
 (0)