Skip to content

Commit a8e14d7

Browse files
Updated thrift files (#161)
* Updated thrift files * Reran command with diff params --------- Co-authored-by: Levko Kravets <[email protected]>
1 parent c9e27f4 commit a8e14d7

File tree

3 files changed

+662
-290
lines changed

3 files changed

+662
-290
lines changed

thrift/TCLIService.d.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ import TExecuteStatementReq = ttypes.TExecuteStatementReq
9797
import TDBSqlStatement = ttypes.TDBSqlStatement
9898
import TSparkParameterValue = ttypes.TSparkParameterValue
9999
import TSparkParameter = ttypes.TSparkParameter
100+
import TStatementConf = ttypes.TStatementConf
100101
import TExecuteStatementResp = ttypes.TExecuteStatementResp
101102
import TGetTypeInfoReq = ttypes.TGetTypeInfoReq
102103
import TGetTypeInfoResp = ttypes.TGetTypeInfoResp
@@ -141,46 +142,88 @@ declare class Client {
141142

142143
constructor(output: thrift.TTransport, pClass: { new(trans: thrift.TTransport): thrift.TProtocol });
143144

145+
OpenSession(req: TOpenSessionReq): TOpenSessionResp;
146+
144147
OpenSession(req: TOpenSessionReq, callback?: (error: void, response: TOpenSessionResp)=>void): void;
145148

149+
CloseSession(req: TCloseSessionReq): TCloseSessionResp;
150+
146151
CloseSession(req: TCloseSessionReq, callback?: (error: void, response: TCloseSessionResp)=>void): void;
147152

153+
GetInfo(req: TGetInfoReq): TGetInfoResp;
154+
148155
GetInfo(req: TGetInfoReq, callback?: (error: void, response: TGetInfoResp)=>void): void;
149156

157+
ExecuteStatement(req: TExecuteStatementReq): TExecuteStatementResp;
158+
150159
ExecuteStatement(req: TExecuteStatementReq, callback?: (error: void, response: TExecuteStatementResp)=>void): void;
151160

161+
GetTypeInfo(req: TGetTypeInfoReq): TGetTypeInfoResp;
162+
152163
GetTypeInfo(req: TGetTypeInfoReq, callback?: (error: void, response: TGetTypeInfoResp)=>void): void;
153164

165+
GetCatalogs(req: TGetCatalogsReq): TGetCatalogsResp;
166+
154167
GetCatalogs(req: TGetCatalogsReq, callback?: (error: void, response: TGetCatalogsResp)=>void): void;
155168

169+
GetSchemas(req: TGetSchemasReq): TGetSchemasResp;
170+
156171
GetSchemas(req: TGetSchemasReq, callback?: (error: void, response: TGetSchemasResp)=>void): void;
157172

173+
GetTables(req: TGetTablesReq): TGetTablesResp;
174+
158175
GetTables(req: TGetTablesReq, callback?: (error: void, response: TGetTablesResp)=>void): void;
159176

177+
GetTableTypes(req: TGetTableTypesReq): TGetTableTypesResp;
178+
160179
GetTableTypes(req: TGetTableTypesReq, callback?: (error: void, response: TGetTableTypesResp)=>void): void;
161180

181+
GetColumns(req: TGetColumnsReq): TGetColumnsResp;
182+
162183
GetColumns(req: TGetColumnsReq, callback?: (error: void, response: TGetColumnsResp)=>void): void;
163184

185+
GetFunctions(req: TGetFunctionsReq): TGetFunctionsResp;
186+
164187
GetFunctions(req: TGetFunctionsReq, callback?: (error: void, response: TGetFunctionsResp)=>void): void;
165188

189+
GetPrimaryKeys(req: TGetPrimaryKeysReq): TGetPrimaryKeysResp;
190+
166191
GetPrimaryKeys(req: TGetPrimaryKeysReq, callback?: (error: void, response: TGetPrimaryKeysResp)=>void): void;
167192

193+
GetCrossReference(req: TGetCrossReferenceReq): TGetCrossReferenceResp;
194+
168195
GetCrossReference(req: TGetCrossReferenceReq, callback?: (error: void, response: TGetCrossReferenceResp)=>void): void;
169196

197+
GetOperationStatus(req: TGetOperationStatusReq): TGetOperationStatusResp;
198+
170199
GetOperationStatus(req: TGetOperationStatusReq, callback?: (error: void, response: TGetOperationStatusResp)=>void): void;
171200

201+
CancelOperation(req: TCancelOperationReq): TCancelOperationResp;
202+
172203
CancelOperation(req: TCancelOperationReq, callback?: (error: void, response: TCancelOperationResp)=>void): void;
173204

205+
CloseOperation(req: TCloseOperationReq): TCloseOperationResp;
206+
174207
CloseOperation(req: TCloseOperationReq, callback?: (error: void, response: TCloseOperationResp)=>void): void;
175208

209+
GetResultSetMetadata(req: TGetResultSetMetadataReq): TGetResultSetMetadataResp;
210+
176211
GetResultSetMetadata(req: TGetResultSetMetadataReq, callback?: (error: void, response: TGetResultSetMetadataResp)=>void): void;
177212

213+
FetchResults(req: TFetchResultsReq): TFetchResultsResp;
214+
178215
FetchResults(req: TFetchResultsReq, callback?: (error: void, response: TFetchResultsResp)=>void): void;
179216

217+
GetDelegationToken(req: TGetDelegationTokenReq): TGetDelegationTokenResp;
218+
180219
GetDelegationToken(req: TGetDelegationTokenReq, callback?: (error: void, response: TGetDelegationTokenResp)=>void): void;
181220

221+
CancelDelegationToken(req: TCancelDelegationTokenReq): TCancelDelegationTokenResp;
222+
182223
CancelDelegationToken(req: TCancelDelegationTokenReq, callback?: (error: void, response: TCancelDelegationTokenResp)=>void): void;
183224

225+
RenewDelegationToken(req: TRenewDelegationTokenReq): TRenewDelegationTokenResp;
226+
184227
RenewDelegationToken(req: TRenewDelegationTokenReq, callback?: (error: void, response: TRenewDelegationTokenResp)=>void): void;
185228
}
186229

thrift/TCLIService_types.d.ts

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,9 @@ declare class TSparkArrowResultLink {
469469
public startRowOffset: Int64;
470470
public rowCount: Int64;
471471
public bytesNum: Int64;
472+
public httpHeaders?: { [k: string]: string; };
472473

473-
constructor(args?: { fileLink: string; expiryTime: Int64; startRowOffset: Int64; rowCount: Int64; bytesNum: Int64; });
474+
constructor(args?: { fileLink: string; expiryTime: Int64; startRowOffset: Int64; rowCount: Int64; bytesNum: Int64; httpHeaders?: { [k: string]: string; }; });
474475
}
475476

476477
declare class TDBSqlCloudResultFile {
@@ -481,8 +482,9 @@ declare class TDBSqlCloudResultFile {
481482
public compressedBytes?: Int64;
482483
public fileLink?: string;
483484
public linkExpiryTime?: Int64;
485+
public httpHeaders?: { [k: string]: string; };
484486

485-
constructor(args?: { filePath?: string; startRowOffset?: Int64; rowCount?: Int64; uncompressedBytes?: Int64; compressedBytes?: Int64; fileLink?: string; linkExpiryTime?: Int64; });
487+
constructor(args?: { filePath?: string; startRowOffset?: Int64; rowCount?: Int64; uncompressedBytes?: Int64; compressedBytes?: Int64; fileLink?: string; linkExpiryTime?: Int64; httpHeaders?: { [k: string]: string; }; });
486488
}
487489

488490
declare class TRowSet {
@@ -555,9 +557,10 @@ declare class TStatus {
555557
public errorCode?: number;
556558
public errorMessage?: string;
557559
public displayMessage?: string;
560+
public errorDetailsJson?: string;
558561
public responseValidation?: Buffer;
559562

560-
constructor(args?: { statusCode: TStatusCode; infoMessages?: string[]; sqlState?: string; errorCode?: number; errorMessage?: string; displayMessage?: string; responseValidation?: Buffer; });
563+
constructor(args?: { statusCode: TStatusCode; infoMessages?: string[]; sqlState?: string; errorCode?: number; errorMessage?: string; displayMessage?: string; errorDetailsJson?: string; responseValidation?: Buffer; });
561564
}
562565

563566
declare class TNamespace {
@@ -696,6 +699,8 @@ declare class TExecuteStatementReq {
696699
public useArrowNativeTypes?: TSparkArrowTypes;
697700
public resultRowLimit?: Int64;
698701
public parameters?: TSparkParameter[];
702+
public maxBytesPerBatch?: Int64;
703+
public statementConf?: TStatementConf;
699704
public operationId?: THandleIdentifier;
700705
public sessionConf?: TDBSqlSessionConf;
701706
public rejectHighCostQueries?: boolean;
@@ -712,8 +717,12 @@ declare class TExecuteStatementReq {
712717
public resultByteLimit?: Int64;
713718
public resultDataFormat?: TDBSqlResultFormat;
714719
public originatingClientIdentity?: string;
720+
public preferSingleFileResult?: boolean;
721+
public preferDriverOnlyUpload?: boolean;
722+
public enforceEmbeddedSchemaCorrectness?: boolean;
723+
public idempotencyToken?: string;
715724

716-
constructor(args?: { sessionHandle: TSessionHandle; statement: string; confOverlay?: { [k: string]: string; }; runAsync?: boolean; getDirectResults?: TSparkGetDirectResults; queryTimeout?: Int64; canReadArrowResult?: boolean; canDownloadResult?: boolean; canDecompressLZ4Result?: boolean; maxBytesPerFile?: Int64; useArrowNativeTypes?: TSparkArrowTypes; resultRowLimit?: Int64; parameters?: TSparkParameter[]; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; rejectHighCostQueries?: boolean; estimatedCost?: number; executionVersion?: number; requestValidation?: Buffer; resultPersistenceMode?: TResultPersistenceMode; trimArrowBatchesToLimit?: boolean; fetchDisposition?: TDBSqlFetchDisposition; enforceResultPersistenceMode?: boolean; statementList?: TDBSqlStatement[]; persistResultManifest?: boolean; resultRetentionSeconds?: Int64; resultByteLimit?: Int64; resultDataFormat?: TDBSqlResultFormat; originatingClientIdentity?: string; });
725+
constructor(args?: { sessionHandle: TSessionHandle; statement: string; confOverlay?: { [k: string]: string; }; runAsync?: boolean; getDirectResults?: TSparkGetDirectResults; queryTimeout?: Int64; canReadArrowResult?: boolean; canDownloadResult?: boolean; canDecompressLZ4Result?: boolean; maxBytesPerFile?: Int64; useArrowNativeTypes?: TSparkArrowTypes; resultRowLimit?: Int64; parameters?: TSparkParameter[]; maxBytesPerBatch?: Int64; statementConf?: TStatementConf; operationId?: THandleIdentifier; sessionConf?: TDBSqlSessionConf; rejectHighCostQueries?: boolean; estimatedCost?: number; executionVersion?: number; requestValidation?: Buffer; resultPersistenceMode?: TResultPersistenceMode; trimArrowBatchesToLimit?: boolean; fetchDisposition?: TDBSqlFetchDisposition; enforceResultPersistenceMode?: boolean; statementList?: TDBSqlStatement[]; persistResultManifest?: boolean; resultRetentionSeconds?: Int64; resultByteLimit?: Int64; resultDataFormat?: TDBSqlResultFormat; originatingClientIdentity?: string; preferSingleFileResult?: boolean; preferDriverOnlyUpload?: boolean; enforceEmbeddedSchemaCorrectness?: boolean; idempotencyToken?: string; });
717726
}
718727

719728
declare class TDBSqlStatement {
@@ -739,6 +748,15 @@ declare class TSparkParameter {
739748
constructor(args?: { ordinal?: number; name?: string; type?: string; value?: TSparkParameterValue; });
740749
}
741750

751+
declare class TStatementConf {
752+
public sessionless?: boolean;
753+
public initialNamespace?: TNamespace;
754+
public client_protocol?: TProtocolVersion;
755+
public client_protocol_i64?: Int64;
756+
757+
constructor(args?: { sessionless?: boolean; initialNamespace?: TNamespace; client_protocol?: TProtocolVersion; client_protocol_i64?: Int64; });
758+
}
759+
742760
declare class TExecuteStatementResp {
743761
public status: TStatus;
744762
public operationHandle?: TOperationHandle;
@@ -961,12 +979,13 @@ declare class TGetOperationStatusResp {
961979
public numModifiedRows?: Int64;
962980
public displayMessage?: string;
963981
public diagnosticInfo?: string;
982+
public errorDetailsJson?: string;
964983
public responseValidation?: Buffer;
965984
public idempotencyType?: TOperationIdempotencyType;
966985
public statementTimeout?: Int64;
967986
public statementTimeoutLevel?: TOperationTimeoutLevel;
968987

969-
constructor(args?: { status: TStatus; operationState?: TOperationState; sqlState?: string; errorCode?: number; errorMessage?: string; taskStatus?: string; operationStarted?: Int64; operationCompleted?: Int64; hasResultSet?: boolean; progressUpdateResponse?: TProgressUpdateResp; numModifiedRows?: Int64; displayMessage?: string; diagnosticInfo?: string; responseValidation?: Buffer; idempotencyType?: TOperationIdempotencyType; statementTimeout?: Int64; statementTimeoutLevel?: TOperationTimeoutLevel; });
988+
constructor(args?: { status: TStatus; operationState?: TOperationState; sqlState?: string; errorCode?: number; errorMessage?: string; taskStatus?: string; operationStarted?: Int64; operationCompleted?: Int64; hasResultSet?: boolean; progressUpdateResponse?: TProgressUpdateResp; numModifiedRows?: Int64; displayMessage?: string; diagnosticInfo?: string; errorDetailsJson?: string; responseValidation?: Buffer; idempotencyType?: TOperationIdempotencyType; statementTimeout?: Int64; statementTimeoutLevel?: TOperationTimeoutLevel; });
970989
}
971990

972991
declare class TCancelOperationReq {
@@ -1023,8 +1042,9 @@ declare class TGetResultSetMetadataResp {
10231042
public isServerless?: boolean;
10241043
public resultDataFormat?: TDBSqlResultFormat;
10251044
public truncatedByThriftLimit?: boolean;
1045+
public resultByteLimit?: Int64;
10261046

1027-
constructor(args?: { status: TStatus; schema?: TTableSchema; resultFormat?: TSparkRowSetType; lz4Compressed?: boolean; arrowSchema?: Buffer; cacheLookupResult?: TCacheLookupResult; uncompressedBytes?: Int64; compressedBytes?: Int64; isStagingOperation?: boolean; reasonForNoCloudFetch?: TCloudFetchDisabledReason; resultFiles?: TDBSqlCloudResultFile[]; manifestFile?: string; manifestFileFormat?: TDBSqlManifestFileFormat; cacheLookupLatency?: Int64; remoteCacheMissReason?: string; fetchDisposition?: TDBSqlFetchDisposition; remoteResultCacheEnabled?: boolean; isServerless?: boolean; resultDataFormat?: TDBSqlResultFormat; truncatedByThriftLimit?: boolean; });
1047+
constructor(args?: { status: TStatus; schema?: TTableSchema; resultFormat?: TSparkRowSetType; lz4Compressed?: boolean; arrowSchema?: Buffer; cacheLookupResult?: TCacheLookupResult; uncompressedBytes?: Int64; compressedBytes?: Int64; isStagingOperation?: boolean; reasonForNoCloudFetch?: TCloudFetchDisabledReason; resultFiles?: TDBSqlCloudResultFile[]; manifestFile?: string; manifestFileFormat?: TDBSqlManifestFileFormat; cacheLookupLatency?: Int64; remoteCacheMissReason?: string; fetchDisposition?: TDBSqlFetchDisposition; remoteResultCacheEnabled?: boolean; isServerless?: boolean; resultDataFormat?: TDBSqlResultFormat; truncatedByThriftLimit?: boolean; resultByteLimit?: Int64; });
10281048
}
10291049

10301050
declare class TFetchResultsReq {

0 commit comments

Comments
 (0)