@cubejs-backend/snowflake-driver 0.29.37 → 0.29.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.29.42](https://github.com/cube-js/cube.js/compare/v0.29.41...v0.29.42) (2022-04-04)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **@cubejs-backend/snowflake-driver:** Download numbers with 0 scale as integers in pre-aggregations ([42eb582](https://github.com/cube-js/cube.js/commit/42eb582908080d4e9e2856c09290950957230fcd))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [0.29.37](https://github.com/cube-js/cube.js/compare/v0.29.36...v0.29.37) (2022-03-29)
7
18
 
8
19
  **Note:** Version bump only for package @cubejs-backend/snowflake-driver
@@ -403,7 +403,7 @@ class SnowflakeDriver extends query_orchestrator_1.BaseDriver {
403
403
  SELECT COLUMNS.COLUMN_NAME as "column_name",
404
404
  COLUMNS.TABLE_NAME as "table_name",
405
405
  COLUMNS.TABLE_SCHEMA as "table_schema",
406
- COLUMNS.DATA_TYPE as "data_type"
406
+ CASE WHEN COLUMNS.NUMERIC_SCALE = 0 AND COLUMNS.DATA_TYPE = 'NUMBER' THEN 'int' ELSE COLUMNS.DATA_TYPE END as "data_type"
407
407
  FROM INFORMATION_SCHEMA.COLUMNS
408
408
  WHERE COLUMNS.TABLE_SCHEMA NOT IN ('INFORMATION_SCHEMA')
409
409
  `;
@@ -419,7 +419,7 @@ class SnowflakeDriver extends query_orchestrator_1.BaseDriver {
419
419
  async tableColumnTypes(table) {
420
420
  const [schema, name] = table.split('.');
421
421
  const columns = await this.query(`SELECT COLUMNS.COLUMN_NAME,
422
- COLUMNS.DATA_TYPE
422
+ CASE WHEN COLUMNS.NUMERIC_SCALE = 0 AND COLUMNS.DATA_TYPE = 'NUMBER' THEN 'int' ELSE COLUMNS.DATA_TYPE END as DATA_TYPE
423
423
  FROM INFORMATION_SCHEMA.COLUMNS
424
424
  WHERE TABLE_NAME = ${this.param(0)} AND TABLE_SCHEMA = ${this.param(1)}
425
425
  ORDER BY ORDINAL_POSITION`, [name.toUpperCase(), schema.toUpperCase()]);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@cubejs-backend/snowflake-driver",
3
3
  "description": "Cube.js Snowflake database driver",
4
4
  "author": "Cube Dev, Inc.",
5
- "version": "0.29.37",
5
+ "version": "0.29.42",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/cube-js/cube.js.git",
@@ -45,5 +45,5 @@
45
45
  "@types/snowflake-sdk": "^1.5.1",
46
46
  "typescript": "~4.1.5"
47
47
  },
48
- "gitHead": "a57ae4bc3b434bb54f7f97f00262c1c4cce02b61"
48
+ "gitHead": "d05b5199da6e06f4d8baaed1baddb56cf1538637"
49
49
  }