From 67bea275f5fb9b073d0f0f8c6f8e442de9b6222e Mon Sep 17 00:00:00 2001 From: Levko Kravets Date: Fri, 18 Aug 2023 14:43:09 +0300 Subject: [PATCH] Prepare release v1.4.0 (#160) * Prepare release v1.4.0 Signed-off-by: Levko Kravets * Update changelog Signed-off-by: Levko Kravets --------- Signed-off-by: Levko Kravets --- CHANGELOG.md | 32 ++++++++++++++++++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 892fc8b6..e7aa2961 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,37 @@ # Release History +## 1.4.0 + +- Added Cloud Fetch support (databricks/databricks-sql-nodejs#158) +- Improved handling of closed sessions and operations (databricks/databricks-sql-nodejs#129). + Now, when session gets closed, all operations associated with it are immediately closed. + Similarly, if client gets closed - all associated sessions (and their operations) are closed as well. + +**Notes**: + +Cloud Fetch is disabled by default. To use it, pass `useCloudFetch: true` +to `IDBSQLSession.executeStatement()`. For example: + +```ts +// obtain session object as usual +const operation = session.executeStatement(query, { + runAsync: true, + useCloudFetch: true, +}); +``` + +Note that Cloud Fetch is effectively enabled only for really large datasets, so if +the query returns only few thousands records, Cloud Fetch won't be enabled no matter +what `useCloudFetch` setting is. Also gentle reminder that for large datasets +it's better to use `fetchChunk` instead of `fetchAll` to avoid OOM errors: + +```ts +do { + const chunk = await operation.fetchChunk({ maxRows: 100000 }); + // process chunk here +} while (await operation.hasMoreRows()); +``` + ## 1.3.0 - Implemented automatic retry for some HTTP errors (429, 503) (databricks/databricks-sql-nodejs#127) diff --git a/package-lock.json b/package-lock.json index 68b39763..5d8169dd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@databricks/sql", - "version": "1.3.0", + "version": "1.4.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@databricks/sql", - "version": "1.3.0", + "version": "1.4.0", "hasInstallScript": true, "license": "Apache 2.0", "dependencies": { diff --git a/package.json b/package.json index aa82c095..25ca6459 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@databricks/sql", - "version": "1.3.0", + "version": "1.4.0", "description": "Driver for connection to Databricks SQL via Thrift API.", "main": "dist/index.js", "types": "dist/index.d.ts",