Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/DBSQLClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default class DBSQLClient extends EventEmitter implements IDBSQLClient, I
retryDelayMin: 1 * 1000, // 1 second
retryDelayMax: 60 * 1000, // 60 seconds (1 minute)

useCloudFetch: false,
useCloudFetch: true, // enabling cloud fetch by default.
cloudFetchConcurrentDownloads: 10,

useLZ4Compression: true,
Expand Down
2 changes: 1 addition & 1 deletion lib/DBSQLSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export default class DBSQLSession implements IDBSQLSession {
...getArrowOptions(clientConfig),
canDownloadResult: options.useCloudFetch ?? clientConfig.useCloudFetch,
parameters: getQueryParameters(options.namedParameters, options.ordinalParameters),
canDecompressLZ4Result: clientConfig.useLZ4Compression && Boolean(LZ4),
canDecompressLZ4Result: (options.useLZ4Compression ?? clientConfig.useLZ4Compression) && Boolean(LZ4),
});
const response = await this.handleResponse(operationPromise);
const operation = this.createOperation(response);
Expand Down
1 change: 1 addition & 0 deletions lib/contracts/IDBSQLSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export type ExecuteStatementOptions = {
runAsync?: boolean;
maxRows?: number | bigint | Int64 | null;
useCloudFetch?: boolean;
useLZ4Compression?: boolean;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you explain why did you introduce this useLZ4Compression option in this PR? it does not seem relevant to cloudFetch enable by default?

Copy link
Contributor Author

@shivam2680 shivam2680 Apr 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can add this in a separate PR also. Just wanted to introduce compression, as this is configurable in other drivers.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is better to do this in a separate PR

stagingAllowedLocalPath?: string | string[];
namedParameters?: Record<string, DBSQLParameter | DBSQLParameterValue>;
ordinalParameters?: Array<DBSQLParameter | DBSQLParameterValue>;
Expand Down
Loading