import { TGetOperationStatusResp, TOperationHandle, TSparkDirectResults, TGetResultSetMetadataResp } from '../../thrift/TCLIService_types'; import IOperationBackend, { IOperationBackendWaitOptions } from '../contracts/IOperationBackend'; import IClientContext from '../contracts/IClientContext'; import { OperationStatus } from '../contracts/OperationStatus'; import { ResultMetadata } from '../contracts/ResultMetadata'; import Status from '../dto/Status'; import RowSetProvider from '../result/RowSetProvider'; import ResultSlicer from '../result/ResultSlicer'; interface ThriftOperationBackendOptions { handle: TOperationHandle; directResults?: TSparkDirectResults; context: IClientContext; } export default class ThriftOperationBackend implements IOperationBackend { private readonly context; private readonly operationHandle; private readonly _data; private readonly closeOperation?; private metadata?; private metadataPromise?; private state; private operationStatus?; private resultHandler?; constructor({ handle, directResults, context }: ThriftOperationBackendOptions); get id(): string; get operationType(): import("../../thrift/TCLIService_types").TOperationType; get dataProvider(): RowSetProvider; hasResultSet(): boolean; fetchChunk({ limit, disableBuffering, isClosed, }: { limit: number; disableBuffering?: boolean; isClosed?: () => boolean; }): Promise>; hasMore(): Promise; status(progress: boolean): Promise; /** * Thrift-specific accessor that returns the raw `TGetOperationStatusResp`. * * Used internally to drive the Thrift state machine + attach the wire * response to `OperationStateError`. Also called by the public * `DBSQLOperation.status()` facade (zero-loss fast path) so existing user * code that reads `taskStatus`, `numModifiedRows`, etc. continues to work * verbatim against the Thrift backend. * * Not declared on `IOperationBackend` — non-Thrift backends do not * implement it. The facade reaches it via `instanceof ThriftOperationBackend`. */ thriftStatusResponse(progress: boolean): Promise; waitUntilReady(options?: IOperationBackendWaitOptions): Promise; getResultMetadata(): Promise; /** * Thrift-specific accessor for the raw `TGetResultSetMetadataResp`. * * Used internally by `getResultHandler` (dispatches on Thrift `resultFormat` * and passes the full Thrift response to the JSON / Arrow / CloudFetch * result handlers). Also called by the public `DBSQLOperation.getMetadata()` * facade (zero-loss fast path). * * Not declared on `IOperationBackend` — non-Thrift backends do not implement * it. The facade reaches it via `instanceof ThriftOperationBackend`. */ thriftResultMetadataResponse(): Promise; cancel(): Promise; close(): Promise; getResultHandler(): Promise>; private processOperationStatusResponse; private adaptOperationStatus; private adaptResultMetadata; } export {};