From cc54ece8f1828a8b21a7eb7d5a00712b8e1035a2 Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Fri, 17 Jan 2025 17:24:03 +0200 Subject: [PATCH 01/14] Remove moment-timezone from vertica driver --- packages/cubejs-vertica-driver/package.json | 1 - packages/cubejs-vertica-driver/src/VerticaQuery.js | 3 +-- yarn.lock | 7 ------- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/packages/cubejs-vertica-driver/package.json b/packages/cubejs-vertica-driver/package.json index de42eaa5f5c73..c1a838e694758 100644 --- a/packages/cubejs-vertica-driver/package.json +++ b/packages/cubejs-vertica-driver/package.json @@ -22,7 +22,6 @@ "@cubejs-backend/base-driver": "1.1.12", "@cubejs-backend/query-orchestrator": "1.1.12", "@cubejs-backend/schema-compiler": "1.1.15", - "moment-timezone": "^0.5.45", "vertica-nodejs": "^1.0.3" }, "license": "Apache-2.0", diff --git a/packages/cubejs-vertica-driver/src/VerticaQuery.js b/packages/cubejs-vertica-driver/src/VerticaQuery.js index 8fd60bc4581f8..512178587cdb3 100644 --- a/packages/cubejs-vertica-driver/src/VerticaQuery.js +++ b/packages/cubejs-vertica-driver/src/VerticaQuery.js @@ -1,4 +1,3 @@ -const moment = require('moment-timezone'); const { BaseFilter, BaseQuery } = require('@cubejs-backend/schema-compiler'); const GRANULARITY_TO_INTERVAL = { @@ -38,7 +37,7 @@ class VerticaQuery extends BaseQuery { } timestampFormat() { - return moment.HTML5_FMT.DATETIME_LOCAL_MS; + return 'YYYY-MM-DDTHH:mm:ss.SSS'; } dateTimeCast(value) { diff --git a/yarn.lock b/yarn.lock index e81a341037e3c..c877d3cfec382 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21871,13 +21871,6 @@ moment-timezone@^0.5.15, moment-timezone@^0.5.27, moment-timezone@^0.5.31, momen dependencies: moment "^2.29.4" -moment-timezone@^0.5.45: - version "0.5.46" - resolved "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.46.tgz#a21aa6392b3c6b3ed916cd5e95858a28d893704a" - integrity sha512-ZXm9b36esbe7OmdABqIWJuBBiLLwAjrN7CE+7sYdCCx82Nabt1wHDj8TVseS59QIlfFPbOoiBPm6ca9BioG4hw== - dependencies: - moment "^2.29.4" - moment@^2.17.1, moment@^2.24.0, moment@^2.25.3, moment@^2.29.1, moment@^2.29.4: version "2.29.4" resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" From 42bffdd5f12205aa903e5ebd27a68c95c7abbda1 Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Fri, 17 Jan 2025 17:27:03 +0200 Subject: [PATCH 02/14] Remove moment-timezone from druid driver --- packages/cubejs-druid-driver/package.json | 3 +-- packages/cubejs-druid-driver/src/DruidQuery.ts | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/cubejs-druid-driver/package.json b/packages/cubejs-druid-driver/package.json index 9c38e1a575082..dba252a7669d4 100644 --- a/packages/cubejs-druid-driver/package.json +++ b/packages/cubejs-druid-driver/package.json @@ -31,8 +31,7 @@ "@cubejs-backend/base-driver": "1.1.12", "@cubejs-backend/schema-compiler": "1.1.15", "@cubejs-backend/shared": "1.1.12", - "axios": "^0.21.1", - "moment-timezone": "^0.5.31" + "axios": "^0.21.1" }, "devDependencies": { "@cubejs-backend/linter": "^1.0.0", diff --git a/packages/cubejs-druid-driver/src/DruidQuery.ts b/packages/cubejs-druid-driver/src/DruidQuery.ts index c22abc450101b..e5d5235fba2d9 100644 --- a/packages/cubejs-druid-driver/src/DruidQuery.ts +++ b/packages/cubejs-druid-driver/src/DruidQuery.ts @@ -1,4 +1,3 @@ -import moment from 'moment-timezone'; import { BaseFilter, BaseQuery } from '@cubejs-backend/schema-compiler'; const GRANULARITY_TO_INTERVAL: Record string> = { From a8ba8696a999d85423b03a46a22986bf7d5fb50c Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Fri, 17 Jan 2025 17:33:07 +0200 Subject: [PATCH 03/14] Remove moment-timezone from dremio driver --- .../cubejs-dremio-driver/driver/DremioQuery.js | 14 ++++++++++---- packages/cubejs-dremio-driver/package.json | 1 - 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/cubejs-dremio-driver/driver/DremioQuery.js b/packages/cubejs-dremio-driver/driver/DremioQuery.js index 94c00e07be82b..92973ae48ee0c 100644 --- a/packages/cubejs-dremio-driver/driver/DremioQuery.js +++ b/packages/cubejs-dremio-driver/driver/DremioQuery.js @@ -1,4 +1,3 @@ -const moment = require('moment-timezone'); const { BaseFilter, BaseQuery } = require('@cubejs-backend/schema-compiler'); const GRANULARITY_TO_INTERVAL = { @@ -36,9 +35,16 @@ class DremioQuery extends BaseQuery { return new DremioFilter(this, filter); } + /** + * CONVERT_TIMEZONE([sourceTimezone string], destinationTimezone string, + * timestamp date, timestamp, or string in ISO 8601 format) → timestamp + * sourceTimezone (optional): The time zone of the timestamp. If you omit this parameter, + * Dremio assumes that the source time zone is UTC. + * @see https://docs.dremio.com/cloud/reference/sql/sql-functions/functions/CONVERT_TIMEZONE/ + */ convertTz(field) { - const targetTZ = moment().tz(this.timezone).format('Z'); - return `CONVERT_TIMEZONE('${targetTZ}', ${field})`; + + return `CONVERT_TIMEZONE('${this.timezone}', ${field})`; } timeStampCast(value) { @@ -46,7 +52,7 @@ class DremioQuery extends BaseQuery { } timestampFormat() { - return moment.HTML5_FMT.DATETIME_LOCAL_MS; + return 'YYYY-MM-DDTHH:mm:ss.SSS'; } dateTimeCast(value) { diff --git a/packages/cubejs-dremio-driver/package.json b/packages/cubejs-dremio-driver/package.json index 22d09419a1edc..793a9643d6de2 100644 --- a/packages/cubejs-dremio-driver/package.json +++ b/packages/cubejs-dremio-driver/package.json @@ -26,7 +26,6 @@ "@cubejs-backend/schema-compiler": "1.1.15", "@cubejs-backend/shared": "1.1.12", "axios": "^0.21.1", - "moment-timezone": "^0.5.31", "sqlstring": "^2.3.1" }, "devDependencies": { From b36afc2aa1f3689b923d8198b81a0c66ada248ca Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Fri, 17 Jan 2025 17:35:45 +0200 Subject: [PATCH 04/14] Remove moment-timezone from cubestore driver --- packages/cubejs-cubestore-driver/package.json | 1 - yarn.lock | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/cubejs-cubestore-driver/package.json b/packages/cubejs-cubestore-driver/package.json index c4ffa68063194..dbfe3103e3a6c 100644 --- a/packages/cubejs-cubestore-driver/package.json +++ b/packages/cubejs-cubestore-driver/package.json @@ -33,7 +33,6 @@ "flatbuffers": "23.3.3", "fs-extra": "^9.1.0", "generic-pool": "^3.6.0", - "moment-timezone": "^0.5.31", "node-fetch": "^2.6.1", "sqlstring": "^2.3.3", "tempy": "^1.0.1", diff --git a/yarn.lock b/yarn.lock index c877d3cfec382..f08f32bf6c9f2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21864,7 +21864,7 @@ moment-range@*, moment-range@^4.0.1: dependencies: es6-symbol "^3.1.0" -moment-timezone@^0.5.15, moment-timezone@^0.5.27, moment-timezone@^0.5.31, moment-timezone@^0.5.33: +moment-timezone@^0.5.15, moment-timezone@^0.5.27, moment-timezone@^0.5.33: version "0.5.45" resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.45.tgz#cb685acd56bac10e69d93c536366eb65aa6bcf5c" integrity sha512-HIWmqA86KcmCAhnMAN0wuDOARV/525R2+lOLotuGFzn4HO+FH+/645z2wx0Dt3iDv6/p61SIvKnDstISainhLQ== From 0ac7674a7f6a9c29692742d7d093ef9e931f5959 Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Fri, 17 Jan 2025 17:39:02 +0200 Subject: [PATCH 05/14] update moment-timezone in api-gateway --- packages/cubejs-api-gateway/package.json | 2 +- yarn.lock | 76 ++++++++++++++++++++++-- 2 files changed, 72 insertions(+), 6 deletions(-) diff --git a/packages/cubejs-api-gateway/package.json b/packages/cubejs-api-gateway/package.json index ab4e6eb91ee1d..b096bef10eb46 100644 --- a/packages/cubejs-api-gateway/package.json +++ b/packages/cubejs-api-gateway/package.json @@ -43,7 +43,7 @@ "jsonwebtoken": "^9.0.2", "jwk-to-pem": "^2.0.4", "moment": "^2.24.0", - "moment-timezone": "^0.5.27", + "moment-timezone": "^0.5.46", "nexus": "^1.1.0", "node-fetch": "^2.6.1", "ramda": "^0.27.0", diff --git a/yarn.lock b/yarn.lock index f08f32bf6c9f2..df4218580fe1e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10123,13 +10123,28 @@ dependencies: "@types/node" "*" -"@types/node@*", "@types/node@12.12.50", "@types/node@^12", "@types/node@^16", "@types/node@^18": +"@types/node@*", "@types/node@^18": version "18.19.46" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.46.tgz#51801396c01153e0626e36f43386e83bc768b072" integrity sha512-vnRgMS7W6cKa1/0G3/DTtQYpVrZ8c0Xm6UkLaVFrb9jtcVC3okokW09Ki1Qdrj9ISokszD69nY4WDLRlvHlhAA== dependencies: undici-types "~5.26.4" +"@types/node@12.12.50": + version "12.12.50" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.50.tgz#e9b2e85fafc15f2a8aa8fdd41091b983da5fd6ee" + integrity sha512-5ImO01Fb8YsEOYpV+aeyGYztcYcjGsBvN4D7G5r1ef2cuQOpymjWNQi5V0rKHE6PC2ru3HkoUr/Br2/8GUA84w== + +"@types/node@^12": + version "12.20.55" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" + integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== + +"@types/node@^16": + version "16.18.124" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.124.tgz#3485947880c049e643e06d9ca368e5a94b4ef92f" + integrity sha512-8ADCm5WzM/IpWxjs1Jhtwo6j+Fb8z4yr/CobP5beUUPdyCI0mg87/bqQYxNcqnhZ24Dc9RME8SQWu5eI/FmSGA== + "@types/normalize-package-data@^2.4.0": version "2.4.1" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" @@ -10172,7 +10187,7 @@ resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== -"@types/ramda@0.27.40", "@types/ramda@^0.27.32", "@types/ramda@^0.27.34", "@types/ramda@^0.27.40": +"@types/ramda@^0.27.32", "@types/ramda@^0.27.34", "@types/ramda@^0.27.40": version "0.27.40" resolved "https://registry.yarnpkg.com/@types/ramda/-/ramda-0.27.40.tgz#99f307356fe553095ee4d3c2af2b0eb3af7a8413" integrity sha512-V99ZfTH2tqVYdLDAlgh2uT+N074HPgqnAsMjALKSBqogYd0HbuuGMqNukJ6fk9Ml/Htaus76fsc4Yh3p7q1VdQ== @@ -13773,6 +13788,11 @@ commander@^8.0.0, commander@^8.3.0: resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== +commander@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.1.0.tgz#d121bbae860d9992a3d517ba96f56588e47c6781" + integrity sha512-J2wnb6TKniXNOtoHS8TSrG9IOQluPrsmyAJ8oCUJOBmv+uLBCyPYAZkD2jFvw2DCzIXNnISIM01NIvr35TkBMQ== + common-tags@^1.8.0: version "1.8.2" resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6" @@ -21864,13 +21884,20 @@ moment-range@*, moment-range@^4.0.1: dependencies: es6-symbol "^3.1.0" -moment-timezone@^0.5.15, moment-timezone@^0.5.27, moment-timezone@^0.5.33: +moment-timezone@^0.5.15, moment-timezone@^0.5.33: version "0.5.45" resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.45.tgz#cb685acd56bac10e69d93c536366eb65aa6bcf5c" integrity sha512-HIWmqA86KcmCAhnMAN0wuDOARV/525R2+lOLotuGFzn4HO+FH+/645z2wx0Dt3iDv6/p61SIvKnDstISainhLQ== dependencies: moment "^2.29.4" +moment-timezone@^0.5.46: + version "0.5.46" + resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.46.tgz#a21aa6392b3c6b3ed916cd5e95858a28d893704a" + integrity sha512-ZXm9b36esbe7OmdABqIWJuBBiLLwAjrN7CE+7sYdCCx82Nabt1wHDj8TVseS59QIlfFPbOoiBPm6ca9BioG4hw== + dependencies: + moment "^2.29.4" + moment@^2.17.1, moment@^2.24.0, moment@^2.25.3, moment@^2.29.1, moment@^2.29.4: version "2.29.4" resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" @@ -22001,6 +22028,11 @@ nan@^2.18.0: resolved "https://registry.yarnpkg.com/nan/-/nan-2.18.0.tgz#26a6faae7ffbeb293a39660e88a76b82e30b7554" integrity sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w== +nan@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-1.0.0.tgz#ae24f8850818d662fcab5acf7f3b95bfaa2ccf38" + integrity sha512-Wm2/nFOm2y9HtJfgOLnctGbfvF23FcQZeyUZqDD8JQG3zO5kXh3MkQKiUaA68mJiVWrOzLFkAV1u6bC8P52DJA== + nanoid@^3.1.30: version "3.3.8" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" @@ -22276,7 +22308,7 @@ node-gyp@^9.3.0: tar "^6.1.2" which "^2.0.2" -node-int64@^0.3.3: +node-int64@^0.3.3, node-int64@~0.3.0: version "0.3.3" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.3.3.tgz#2d6e6b2ece5de8588b43d88d1bc41b26cd1fa84d" integrity sha1-LW5rLs5d6FiLQ9iNG8QbJs0fqE0= @@ -22871,6 +22903,11 @@ optionator@^0.9.3: prelude-ls "^1.2.1" type-check "^0.4.0" +options@>=0.0.5: + version "0.0.6" + resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" + integrity sha512-bOj3L1ypm++N+n7CEbbe473A414AB7z+amKYshRb//iuL3MpdDCLhPnw6aVTdKB9g5ZRVHIEp8eUln6L2NUStg== + ora@5.4.1, ora@^5.1.0, ora@^5.3.0, ora@^5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" @@ -24834,6 +24871,11 @@ python-struct@^1.1.3: dependencies: long "^4.0.0" +q@1.0.x: + version "1.0.1" + resolved "https://registry.yarnpkg.com/q/-/q-1.0.1.tgz#11872aeedee89268110b10a718448ffb10112a14" + integrity sha512-18MnBaCeBX9sLRUdtxz/6onlb7wLzFxCylklyO8n27y5JxJYaGLPu4ccyc5zih58SpEzY8QmfwaWqguqXU6Y+A== + q@^1.5.0, q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -28263,7 +28305,7 @@ thread-loader@^3.0.0: neo-async "^2.6.2" schema-utils "^3.0.0" -thrift@0.20.0, thrift@^0.20.0, thrift@^0.9.3: +thrift@^0.20.0: version "0.20.0" resolved "https://registry.yarnpkg.com/thrift/-/thrift-0.20.0.tgz#b2dbeaaf7c2385aed2eba59d442c87f033fa8e5e" integrity sha512-oSmJTaoIAGolpupVHFfsWcmdEKX81fcDI6ty0hhezzdgZvp0XyXgMe9+1YusI8Ahy0HK4n8jlNrkPjOPeHZjdQ== @@ -28274,6 +28316,15 @@ thrift@0.20.0, thrift@^0.20.0, thrift@^0.9.3: q "^1.5.0" ws "^5.2.3" +thrift@^0.9.3: + version "0.9.3" + resolved "https://registry.yarnpkg.com/thrift/-/thrift-0.9.3.tgz#99021336403d42e08b8efadb1c37a06d7998b2a6" + integrity sha512-CLjTMnk31Yhcteeyfhxv1UU8yv0jqlc5kNDGogbpWG2mUU2sJtj33sQzA+qml8Kj2y8WUdVKY7kkZxiczKoATw== + dependencies: + node-int64 "~0.3.0" + q "1.0.x" + ws "~0.4.32" + throat@^6.0.1: version "6.0.2" resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.2.tgz#51a3fbb5e11ae72e2cf74861ed5c8020f89f29fe" @@ -28356,6 +28407,11 @@ tinycolor2@^1.4.1: resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.2.tgz#3f6a4d1071ad07676d7fa472e1fac40a719d8803" integrity sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA== +tinycolor@0.x: + version "0.0.1" + resolved "https://registry.yarnpkg.com/tinycolor/-/tinycolor-0.0.1.tgz#320b5a52d83abb5978d81a3e887d4aefb15a6164" + integrity sha512-+CorETse1kl98xg0WAzii8DTT4ABF4R3nquhrkIbVGcw1T8JYs5Gfx9xEfGINPUZGDj9C4BmOtuKeaTtuuRolg== + tinypool@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.7.0.tgz#88053cc99b4a594382af23190c609d93fddf8021" @@ -30017,6 +30073,16 @@ ws@^8.1.0, ws@^8.13.0, ws@^8.16.0: resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== +ws@~0.4.32: + version "0.4.32" + resolved "https://registry.yarnpkg.com/ws/-/ws-0.4.32.tgz#787a6154414f3c99ed83c5772153b20feb0cec32" + integrity sha512-htqsS0U9Z9lb3ITjidQkRvkLdVhQePrMeu475yEfOWkAYvJ6dSjQp1tOH6ugaddzX5b7sQjMPNtY71eTzrV/kA== + dependencies: + commander "~2.1.0" + nan "~1.0.0" + options ">=0.0.5" + tinycolor "0.x" + ws@~7.4.2: version "7.4.6" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" From 970981633891ac5ca8548343a2563df35f65ec77 Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Fri, 17 Jan 2025 18:22:18 +0200 Subject: [PATCH 06/14] update moment-timezone in backend-shared --- packages/cubejs-backend-shared/package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cubejs-backend-shared/package.json b/packages/cubejs-backend-shared/package.json index d0a59c6b98f42..691caf3fdee2e 100644 --- a/packages/cubejs-backend-shared/package.json +++ b/packages/cubejs-backend-shared/package.json @@ -44,7 +44,7 @@ "fs-extra": "^9.1.0", "http-proxy-agent": "^4.0.1", "moment-range": "^4.0.1", - "moment-timezone": "^0.5.33", + "moment-timezone": "^0.5.46", "node-fetch": "^2.6.1", "shelljs": "^0.8.5", "throttle-debounce": "^3.0.1", diff --git a/yarn.lock b/yarn.lock index df4218580fe1e..bcc4af636b957 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13725,7 +13725,7 @@ colorette@^2.0.10: resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== -colors@^1.1.2, colors@^1.2.1: +colors@1.4.0, colors@^1.1.2, colors@^1.2.1: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== From ecc49d74e94a44a7a014747e7109d7b084dc2f30 Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Fri, 17 Jan 2025 18:25:43 +0200 Subject: [PATCH 07/14] Remove moment-timezone from query-orchestrator --- .../cubejs-query-orchestrator/package.json | 1 - yarn.lock | 69 ++----------------- 2 files changed, 5 insertions(+), 65 deletions(-) diff --git a/packages/cubejs-query-orchestrator/package.json b/packages/cubejs-query-orchestrator/package.json index 1d5fcb575194c..b25022a4d4055 100644 --- a/packages/cubejs-query-orchestrator/package.json +++ b/packages/cubejs-query-orchestrator/package.json @@ -36,7 +36,6 @@ "es5-ext": "0.10.53", "generic-pool": "^3.7.1", "lru-cache": "^6.0.0", - "moment-timezone": "^0.5.33", "ramda": "^0.27.2" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index bcc4af636b957..4c710e068fe12 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10123,28 +10123,13 @@ dependencies: "@types/node" "*" -"@types/node@*", "@types/node@^18": +"@types/node@*", "@types/node@12.12.50", "@types/node@^12", "@types/node@^16", "@types/node@^18": version "18.19.46" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.46.tgz#51801396c01153e0626e36f43386e83bc768b072" integrity sha512-vnRgMS7W6cKa1/0G3/DTtQYpVrZ8c0Xm6UkLaVFrb9jtcVC3okokW09Ki1Qdrj9ISokszD69nY4WDLRlvHlhAA== dependencies: undici-types "~5.26.4" -"@types/node@12.12.50": - version "12.12.50" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.50.tgz#e9b2e85fafc15f2a8aa8fdd41091b983da5fd6ee" - integrity sha512-5ImO01Fb8YsEOYpV+aeyGYztcYcjGsBvN4D7G5r1ef2cuQOpymjWNQi5V0rKHE6PC2ru3HkoUr/Br2/8GUA84w== - -"@types/node@^12": - version "12.20.55" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" - integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== - -"@types/node@^16": - version "16.18.124" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.124.tgz#3485947880c049e643e06d9ca368e5a94b4ef92f" - integrity sha512-8ADCm5WzM/IpWxjs1Jhtwo6j+Fb8z4yr/CobP5beUUPdyCI0mg87/bqQYxNcqnhZ24Dc9RME8SQWu5eI/FmSGA== - "@types/normalize-package-data@^2.4.0": version "2.4.1" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" @@ -10187,7 +10172,7 @@ resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== -"@types/ramda@^0.27.32", "@types/ramda@^0.27.34", "@types/ramda@^0.27.40": +"@types/ramda@0.27.40", "@types/ramda@^0.27.32", "@types/ramda@^0.27.34", "@types/ramda@^0.27.40": version "0.27.40" resolved "https://registry.yarnpkg.com/@types/ramda/-/ramda-0.27.40.tgz#99f307356fe553095ee4d3c2af2b0eb3af7a8413" integrity sha512-V99ZfTH2tqVYdLDAlgh2uT+N074HPgqnAsMjALKSBqogYd0HbuuGMqNukJ6fk9Ml/Htaus76fsc4Yh3p7q1VdQ== @@ -13725,7 +13710,7 @@ colorette@^2.0.10: resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== -colors@1.4.0, colors@^1.1.2, colors@^1.2.1: +colors@^1.1.2, colors@^1.2.1: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== @@ -13788,11 +13773,6 @@ commander@^8.0.0, commander@^8.3.0: resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== -commander@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.1.0.tgz#d121bbae860d9992a3d517ba96f56588e47c6781" - integrity sha512-J2wnb6TKniXNOtoHS8TSrG9IOQluPrsmyAJ8oCUJOBmv+uLBCyPYAZkD2jFvw2DCzIXNnISIM01NIvr35TkBMQ== - common-tags@^1.8.0: version "1.8.2" resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6" @@ -22028,11 +22008,6 @@ nan@^2.18.0: resolved "https://registry.yarnpkg.com/nan/-/nan-2.18.0.tgz#26a6faae7ffbeb293a39660e88a76b82e30b7554" integrity sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w== -nan@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-1.0.0.tgz#ae24f8850818d662fcab5acf7f3b95bfaa2ccf38" - integrity sha512-Wm2/nFOm2y9HtJfgOLnctGbfvF23FcQZeyUZqDD8JQG3zO5kXh3MkQKiUaA68mJiVWrOzLFkAV1u6bC8P52DJA== - nanoid@^3.1.30: version "3.3.8" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" @@ -22308,7 +22283,7 @@ node-gyp@^9.3.0: tar "^6.1.2" which "^2.0.2" -node-int64@^0.3.3, node-int64@~0.3.0: +node-int64@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.3.3.tgz#2d6e6b2ece5de8588b43d88d1bc41b26cd1fa84d" integrity sha1-LW5rLs5d6FiLQ9iNG8QbJs0fqE0= @@ -22903,11 +22878,6 @@ optionator@^0.9.3: prelude-ls "^1.2.1" type-check "^0.4.0" -options@>=0.0.5: - version "0.0.6" - resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" - integrity sha512-bOj3L1ypm++N+n7CEbbe473A414AB7z+amKYshRb//iuL3MpdDCLhPnw6aVTdKB9g5ZRVHIEp8eUln6L2NUStg== - ora@5.4.1, ora@^5.1.0, ora@^5.3.0, ora@^5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" @@ -24871,11 +24841,6 @@ python-struct@^1.1.3: dependencies: long "^4.0.0" -q@1.0.x: - version "1.0.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.0.1.tgz#11872aeedee89268110b10a718448ffb10112a14" - integrity sha512-18MnBaCeBX9sLRUdtxz/6onlb7wLzFxCylklyO8n27y5JxJYaGLPu4ccyc5zih58SpEzY8QmfwaWqguqXU6Y+A== - q@^1.5.0, q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -28305,7 +28270,7 @@ thread-loader@^3.0.0: neo-async "^2.6.2" schema-utils "^3.0.0" -thrift@^0.20.0: +thrift@0.20.0, thrift@^0.20.0, thrift@^0.9.3: version "0.20.0" resolved "https://registry.yarnpkg.com/thrift/-/thrift-0.20.0.tgz#b2dbeaaf7c2385aed2eba59d442c87f033fa8e5e" integrity sha512-oSmJTaoIAGolpupVHFfsWcmdEKX81fcDI6ty0hhezzdgZvp0XyXgMe9+1YusI8Ahy0HK4n8jlNrkPjOPeHZjdQ== @@ -28316,15 +28281,6 @@ thrift@^0.20.0: q "^1.5.0" ws "^5.2.3" -thrift@^0.9.3: - version "0.9.3" - resolved "https://registry.yarnpkg.com/thrift/-/thrift-0.9.3.tgz#99021336403d42e08b8efadb1c37a06d7998b2a6" - integrity sha512-CLjTMnk31Yhcteeyfhxv1UU8yv0jqlc5kNDGogbpWG2mUU2sJtj33sQzA+qml8Kj2y8WUdVKY7kkZxiczKoATw== - dependencies: - node-int64 "~0.3.0" - q "1.0.x" - ws "~0.4.32" - throat@^6.0.1: version "6.0.2" resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.2.tgz#51a3fbb5e11ae72e2cf74861ed5c8020f89f29fe" @@ -28407,11 +28363,6 @@ tinycolor2@^1.4.1: resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.2.tgz#3f6a4d1071ad07676d7fa472e1fac40a719d8803" integrity sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA== -tinycolor@0.x: - version "0.0.1" - resolved "https://registry.yarnpkg.com/tinycolor/-/tinycolor-0.0.1.tgz#320b5a52d83abb5978d81a3e887d4aefb15a6164" - integrity sha512-+CorETse1kl98xg0WAzii8DTT4ABF4R3nquhrkIbVGcw1T8JYs5Gfx9xEfGINPUZGDj9C4BmOtuKeaTtuuRolg== - tinypool@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.7.0.tgz#88053cc99b4a594382af23190c609d93fddf8021" @@ -30073,16 +30024,6 @@ ws@^8.1.0, ws@^8.13.0, ws@^8.16.0: resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== -ws@~0.4.32: - version "0.4.32" - resolved "https://registry.yarnpkg.com/ws/-/ws-0.4.32.tgz#787a6154414f3c99ed83c5772153b20feb0cec32" - integrity sha512-htqsS0U9Z9lb3ITjidQkRvkLdVhQePrMeu475yEfOWkAYvJ6dSjQp1tOH6ugaddzX5b7sQjMPNtY71eTzrV/kA== - dependencies: - commander "~2.1.0" - nan "~1.0.0" - options ">=0.0.5" - tinycolor "0.x" - ws@~7.4.2: version "7.4.6" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" From e24ec9ca812cf23db43eb361d510cb957bbbdad7 Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Fri, 17 Jan 2025 18:27:37 +0200 Subject: [PATCH 08/14] update moment-timezone in schema-compiler --- packages/cubejs-schema-compiler/package.json | 2 +- yarn.lock | 67 ++++++++++++++++++-- 2 files changed, 64 insertions(+), 5 deletions(-) diff --git a/packages/cubejs-schema-compiler/package.json b/packages/cubejs-schema-compiler/package.json index 7c4716c2cad67..2e888e4fc8630 100644 --- a/packages/cubejs-schema-compiler/package.json +++ b/packages/cubejs-schema-compiler/package.json @@ -50,7 +50,7 @@ "joi": "^17.8.3", "js-yaml": "^4.1.0", "lru-cache": "^5.1.1", - "moment-timezone": "^0.5.33", + "moment-timezone": "^0.5.46", "node-dijkstra": "^2.5.0", "ramda": "^0.27.2", "syntax-error": "^1.3.0", diff --git a/yarn.lock b/yarn.lock index 4c710e068fe12..df4218580fe1e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10123,13 +10123,28 @@ dependencies: "@types/node" "*" -"@types/node@*", "@types/node@12.12.50", "@types/node@^12", "@types/node@^16", "@types/node@^18": +"@types/node@*", "@types/node@^18": version "18.19.46" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.46.tgz#51801396c01153e0626e36f43386e83bc768b072" integrity sha512-vnRgMS7W6cKa1/0G3/DTtQYpVrZ8c0Xm6UkLaVFrb9jtcVC3okokW09Ki1Qdrj9ISokszD69nY4WDLRlvHlhAA== dependencies: undici-types "~5.26.4" +"@types/node@12.12.50": + version "12.12.50" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.50.tgz#e9b2e85fafc15f2a8aa8fdd41091b983da5fd6ee" + integrity sha512-5ImO01Fb8YsEOYpV+aeyGYztcYcjGsBvN4D7G5r1ef2cuQOpymjWNQi5V0rKHE6PC2ru3HkoUr/Br2/8GUA84w== + +"@types/node@^12": + version "12.20.55" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" + integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== + +"@types/node@^16": + version "16.18.124" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.124.tgz#3485947880c049e643e06d9ca368e5a94b4ef92f" + integrity sha512-8ADCm5WzM/IpWxjs1Jhtwo6j+Fb8z4yr/CobP5beUUPdyCI0mg87/bqQYxNcqnhZ24Dc9RME8SQWu5eI/FmSGA== + "@types/normalize-package-data@^2.4.0": version "2.4.1" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" @@ -10172,7 +10187,7 @@ resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== -"@types/ramda@0.27.40", "@types/ramda@^0.27.32", "@types/ramda@^0.27.34", "@types/ramda@^0.27.40": +"@types/ramda@^0.27.32", "@types/ramda@^0.27.34", "@types/ramda@^0.27.40": version "0.27.40" resolved "https://registry.yarnpkg.com/@types/ramda/-/ramda-0.27.40.tgz#99f307356fe553095ee4d3c2af2b0eb3af7a8413" integrity sha512-V99ZfTH2tqVYdLDAlgh2uT+N074HPgqnAsMjALKSBqogYd0HbuuGMqNukJ6fk9Ml/Htaus76fsc4Yh3p7q1VdQ== @@ -13773,6 +13788,11 @@ commander@^8.0.0, commander@^8.3.0: resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== +commander@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.1.0.tgz#d121bbae860d9992a3d517ba96f56588e47c6781" + integrity sha512-J2wnb6TKniXNOtoHS8TSrG9IOQluPrsmyAJ8oCUJOBmv+uLBCyPYAZkD2jFvw2DCzIXNnISIM01NIvr35TkBMQ== + common-tags@^1.8.0: version "1.8.2" resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6" @@ -22008,6 +22028,11 @@ nan@^2.18.0: resolved "https://registry.yarnpkg.com/nan/-/nan-2.18.0.tgz#26a6faae7ffbeb293a39660e88a76b82e30b7554" integrity sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w== +nan@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-1.0.0.tgz#ae24f8850818d662fcab5acf7f3b95bfaa2ccf38" + integrity sha512-Wm2/nFOm2y9HtJfgOLnctGbfvF23FcQZeyUZqDD8JQG3zO5kXh3MkQKiUaA68mJiVWrOzLFkAV1u6bC8P52DJA== + nanoid@^3.1.30: version "3.3.8" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" @@ -22283,7 +22308,7 @@ node-gyp@^9.3.0: tar "^6.1.2" which "^2.0.2" -node-int64@^0.3.3: +node-int64@^0.3.3, node-int64@~0.3.0: version "0.3.3" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.3.3.tgz#2d6e6b2ece5de8588b43d88d1bc41b26cd1fa84d" integrity sha1-LW5rLs5d6FiLQ9iNG8QbJs0fqE0= @@ -22878,6 +22903,11 @@ optionator@^0.9.3: prelude-ls "^1.2.1" type-check "^0.4.0" +options@>=0.0.5: + version "0.0.6" + resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" + integrity sha512-bOj3L1ypm++N+n7CEbbe473A414AB7z+amKYshRb//iuL3MpdDCLhPnw6aVTdKB9g5ZRVHIEp8eUln6L2NUStg== + ora@5.4.1, ora@^5.1.0, ora@^5.3.0, ora@^5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" @@ -24841,6 +24871,11 @@ python-struct@^1.1.3: dependencies: long "^4.0.0" +q@1.0.x: + version "1.0.1" + resolved "https://registry.yarnpkg.com/q/-/q-1.0.1.tgz#11872aeedee89268110b10a718448ffb10112a14" + integrity sha512-18MnBaCeBX9sLRUdtxz/6onlb7wLzFxCylklyO8n27y5JxJYaGLPu4ccyc5zih58SpEzY8QmfwaWqguqXU6Y+A== + q@^1.5.0, q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -28270,7 +28305,7 @@ thread-loader@^3.0.0: neo-async "^2.6.2" schema-utils "^3.0.0" -thrift@0.20.0, thrift@^0.20.0, thrift@^0.9.3: +thrift@^0.20.0: version "0.20.0" resolved "https://registry.yarnpkg.com/thrift/-/thrift-0.20.0.tgz#b2dbeaaf7c2385aed2eba59d442c87f033fa8e5e" integrity sha512-oSmJTaoIAGolpupVHFfsWcmdEKX81fcDI6ty0hhezzdgZvp0XyXgMe9+1YusI8Ahy0HK4n8jlNrkPjOPeHZjdQ== @@ -28281,6 +28316,15 @@ thrift@0.20.0, thrift@^0.20.0, thrift@^0.9.3: q "^1.5.0" ws "^5.2.3" +thrift@^0.9.3: + version "0.9.3" + resolved "https://registry.yarnpkg.com/thrift/-/thrift-0.9.3.tgz#99021336403d42e08b8efadb1c37a06d7998b2a6" + integrity sha512-CLjTMnk31Yhcteeyfhxv1UU8yv0jqlc5kNDGogbpWG2mUU2sJtj33sQzA+qml8Kj2y8WUdVKY7kkZxiczKoATw== + dependencies: + node-int64 "~0.3.0" + q "1.0.x" + ws "~0.4.32" + throat@^6.0.1: version "6.0.2" resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.2.tgz#51a3fbb5e11ae72e2cf74861ed5c8020f89f29fe" @@ -28363,6 +28407,11 @@ tinycolor2@^1.4.1: resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.2.tgz#3f6a4d1071ad07676d7fa472e1fac40a719d8803" integrity sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA== +tinycolor@0.x: + version "0.0.1" + resolved "https://registry.yarnpkg.com/tinycolor/-/tinycolor-0.0.1.tgz#320b5a52d83abb5978d81a3e887d4aefb15a6164" + integrity sha512-+CorETse1kl98xg0WAzii8DTT4ABF4R3nquhrkIbVGcw1T8JYs5Gfx9xEfGINPUZGDj9C4BmOtuKeaTtuuRolg== + tinypool@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.7.0.tgz#88053cc99b4a594382af23190c609d93fddf8021" @@ -30024,6 +30073,16 @@ ws@^8.1.0, ws@^8.13.0, ws@^8.16.0: resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== +ws@~0.4.32: + version "0.4.32" + resolved "https://registry.yarnpkg.com/ws/-/ws-0.4.32.tgz#787a6154414f3c99ed83c5772153b20feb0cec32" + integrity sha512-htqsS0U9Z9lb3ITjidQkRvkLdVhQePrMeu475yEfOWkAYvJ6dSjQp1tOH6ugaddzX5b7sQjMPNtY71eTzrV/kA== + dependencies: + commander "~2.1.0" + nan "~1.0.0" + options ">=0.0.5" + tinycolor "0.x" + ws@~7.4.2: version "7.4.6" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" From 2943892e7b1542d77993d8593be7a44a12c461d2 Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Fri, 17 Jan 2025 19:18:30 +0200 Subject: [PATCH 09/14] remove unused --- packages/cubejs-schema-compiler/src/adapter/BaseQuery.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/cubejs-schema-compiler/src/adapter/BaseQuery.js b/packages/cubejs-schema-compiler/src/adapter/BaseQuery.js index 002586ce92307..f7154b203e0e6 100644 --- a/packages/cubejs-schema-compiler/src/adapter/BaseQuery.js +++ b/packages/cubejs-schema-compiler/src/adapter/BaseQuery.js @@ -2818,10 +2818,6 @@ export class BaseQuery { return this.join && this.join.multiplicationFactor[cubeName]; } - inIntegrationTimeZone(date) { - return moment.tz(date, this.timezone); - } - inDbTimeZone(date) { return inDbTimeZone(this.timezone, this.timestampFormat(), date); } From fd9b309701ccb73e6c640674a3129396210d7c2f Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Fri, 17 Jan 2025 19:18:45 +0200 Subject: [PATCH 10/14] update yarn lock --- yarn.lock | 67 ++++--------------------------------------------------- 1 file changed, 4 insertions(+), 63 deletions(-) diff --git a/yarn.lock b/yarn.lock index df4218580fe1e..4c710e068fe12 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10123,28 +10123,13 @@ dependencies: "@types/node" "*" -"@types/node@*", "@types/node@^18": +"@types/node@*", "@types/node@12.12.50", "@types/node@^12", "@types/node@^16", "@types/node@^18": version "18.19.46" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.46.tgz#51801396c01153e0626e36f43386e83bc768b072" integrity sha512-vnRgMS7W6cKa1/0G3/DTtQYpVrZ8c0Xm6UkLaVFrb9jtcVC3okokW09Ki1Qdrj9ISokszD69nY4WDLRlvHlhAA== dependencies: undici-types "~5.26.4" -"@types/node@12.12.50": - version "12.12.50" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.50.tgz#e9b2e85fafc15f2a8aa8fdd41091b983da5fd6ee" - integrity sha512-5ImO01Fb8YsEOYpV+aeyGYztcYcjGsBvN4D7G5r1ef2cuQOpymjWNQi5V0rKHE6PC2ru3HkoUr/Br2/8GUA84w== - -"@types/node@^12": - version "12.20.55" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" - integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== - -"@types/node@^16": - version "16.18.124" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.124.tgz#3485947880c049e643e06d9ca368e5a94b4ef92f" - integrity sha512-8ADCm5WzM/IpWxjs1Jhtwo6j+Fb8z4yr/CobP5beUUPdyCI0mg87/bqQYxNcqnhZ24Dc9RME8SQWu5eI/FmSGA== - "@types/normalize-package-data@^2.4.0": version "2.4.1" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" @@ -10187,7 +10172,7 @@ resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== -"@types/ramda@^0.27.32", "@types/ramda@^0.27.34", "@types/ramda@^0.27.40": +"@types/ramda@0.27.40", "@types/ramda@^0.27.32", "@types/ramda@^0.27.34", "@types/ramda@^0.27.40": version "0.27.40" resolved "https://registry.yarnpkg.com/@types/ramda/-/ramda-0.27.40.tgz#99f307356fe553095ee4d3c2af2b0eb3af7a8413" integrity sha512-V99ZfTH2tqVYdLDAlgh2uT+N074HPgqnAsMjALKSBqogYd0HbuuGMqNukJ6fk9Ml/Htaus76fsc4Yh3p7q1VdQ== @@ -13788,11 +13773,6 @@ commander@^8.0.0, commander@^8.3.0: resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== -commander@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.1.0.tgz#d121bbae860d9992a3d517ba96f56588e47c6781" - integrity sha512-J2wnb6TKniXNOtoHS8TSrG9IOQluPrsmyAJ8oCUJOBmv+uLBCyPYAZkD2jFvw2DCzIXNnISIM01NIvr35TkBMQ== - common-tags@^1.8.0: version "1.8.2" resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6" @@ -22028,11 +22008,6 @@ nan@^2.18.0: resolved "https://registry.yarnpkg.com/nan/-/nan-2.18.0.tgz#26a6faae7ffbeb293a39660e88a76b82e30b7554" integrity sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w== -nan@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-1.0.0.tgz#ae24f8850818d662fcab5acf7f3b95bfaa2ccf38" - integrity sha512-Wm2/nFOm2y9HtJfgOLnctGbfvF23FcQZeyUZqDD8JQG3zO5kXh3MkQKiUaA68mJiVWrOzLFkAV1u6bC8P52DJA== - nanoid@^3.1.30: version "3.3.8" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" @@ -22308,7 +22283,7 @@ node-gyp@^9.3.0: tar "^6.1.2" which "^2.0.2" -node-int64@^0.3.3, node-int64@~0.3.0: +node-int64@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.3.3.tgz#2d6e6b2ece5de8588b43d88d1bc41b26cd1fa84d" integrity sha1-LW5rLs5d6FiLQ9iNG8QbJs0fqE0= @@ -22903,11 +22878,6 @@ optionator@^0.9.3: prelude-ls "^1.2.1" type-check "^0.4.0" -options@>=0.0.5: - version "0.0.6" - resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" - integrity sha512-bOj3L1ypm++N+n7CEbbe473A414AB7z+amKYshRb//iuL3MpdDCLhPnw6aVTdKB9g5ZRVHIEp8eUln6L2NUStg== - ora@5.4.1, ora@^5.1.0, ora@^5.3.0, ora@^5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" @@ -24871,11 +24841,6 @@ python-struct@^1.1.3: dependencies: long "^4.0.0" -q@1.0.x: - version "1.0.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.0.1.tgz#11872aeedee89268110b10a718448ffb10112a14" - integrity sha512-18MnBaCeBX9sLRUdtxz/6onlb7wLzFxCylklyO8n27y5JxJYaGLPu4ccyc5zih58SpEzY8QmfwaWqguqXU6Y+A== - q@^1.5.0, q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -28305,7 +28270,7 @@ thread-loader@^3.0.0: neo-async "^2.6.2" schema-utils "^3.0.0" -thrift@^0.20.0: +thrift@0.20.0, thrift@^0.20.0, thrift@^0.9.3: version "0.20.0" resolved "https://registry.yarnpkg.com/thrift/-/thrift-0.20.0.tgz#b2dbeaaf7c2385aed2eba59d442c87f033fa8e5e" integrity sha512-oSmJTaoIAGolpupVHFfsWcmdEKX81fcDI6ty0hhezzdgZvp0XyXgMe9+1YusI8Ahy0HK4n8jlNrkPjOPeHZjdQ== @@ -28316,15 +28281,6 @@ thrift@^0.20.0: q "^1.5.0" ws "^5.2.3" -thrift@^0.9.3: - version "0.9.3" - resolved "https://registry.yarnpkg.com/thrift/-/thrift-0.9.3.tgz#99021336403d42e08b8efadb1c37a06d7998b2a6" - integrity sha512-CLjTMnk31Yhcteeyfhxv1UU8yv0jqlc5kNDGogbpWG2mUU2sJtj33sQzA+qml8Kj2y8WUdVKY7kkZxiczKoATw== - dependencies: - node-int64 "~0.3.0" - q "1.0.x" - ws "~0.4.32" - throat@^6.0.1: version "6.0.2" resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.2.tgz#51a3fbb5e11ae72e2cf74861ed5c8020f89f29fe" @@ -28407,11 +28363,6 @@ tinycolor2@^1.4.1: resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.2.tgz#3f6a4d1071ad07676d7fa472e1fac40a719d8803" integrity sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA== -tinycolor@0.x: - version "0.0.1" - resolved "https://registry.yarnpkg.com/tinycolor/-/tinycolor-0.0.1.tgz#320b5a52d83abb5978d81a3e887d4aefb15a6164" - integrity sha512-+CorETse1kl98xg0WAzii8DTT4ABF4R3nquhrkIbVGcw1T8JYs5Gfx9xEfGINPUZGDj9C4BmOtuKeaTtuuRolg== - tinypool@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.7.0.tgz#88053cc99b4a594382af23190c609d93fddf8021" @@ -30073,16 +30024,6 @@ ws@^8.1.0, ws@^8.13.0, ws@^8.16.0: resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== -ws@~0.4.32: - version "0.4.32" - resolved "https://registry.yarnpkg.com/ws/-/ws-0.4.32.tgz#787a6154414f3c99ed83c5772153b20feb0cec32" - integrity sha512-htqsS0U9Z9lb3ITjidQkRvkLdVhQePrMeu475yEfOWkAYvJ6dSjQp1tOH6ugaddzX5b7sQjMPNtY71eTzrV/kA== - dependencies: - commander "~2.1.0" - nan "~1.0.0" - options ">=0.0.5" - tinycolor "0.x" - ws@~7.4.2: version "7.4.6" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" From 8b62638c48f5663da8a509045ddacc34cf62ed23 Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Fri, 17 Jan 2025 19:19:52 +0200 Subject: [PATCH 11/14] =?UTF-8?q?remove=20moment.HTML5=5FFMT.DATETIME=5FLO?= =?UTF-8?q?CAL=5FMS=20in=C2=A0favor=20of=C2=A0just=20literal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/cubejs-schema-compiler/src/adapter/CubeStoreQuery.ts | 2 +- packages/cubejs-schema-compiler/src/adapter/MysqlQuery.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cubejs-schema-compiler/src/adapter/CubeStoreQuery.ts b/packages/cubejs-schema-compiler/src/adapter/CubeStoreQuery.ts index 535baf1eead09..afb51ee45fbc8 100644 --- a/packages/cubejs-schema-compiler/src/adapter/CubeStoreQuery.ts +++ b/packages/cubejs-schema-compiler/src/adapter/CubeStoreQuery.ts @@ -47,7 +47,7 @@ export class CubeStoreQuery extends BaseQuery { } public timestampFormat() { - return moment.HTML5_FMT.DATETIME_LOCAL_MS; + return 'YYYY-MM-DDTHH:mm:ss.SSS'; } public dateTimeCast(value) { diff --git a/packages/cubejs-schema-compiler/src/adapter/MysqlQuery.ts b/packages/cubejs-schema-compiler/src/adapter/MysqlQuery.ts index a6a304b7e9f01..e26cf11499063 100644 --- a/packages/cubejs-schema-compiler/src/adapter/MysqlQuery.ts +++ b/packages/cubejs-schema-compiler/src/adapter/MysqlQuery.ts @@ -43,7 +43,7 @@ export class MysqlQuery extends BaseQuery { } public timestampFormat() { - return moment.HTML5_FMT.DATETIME_LOCAL_MS; + return 'YYYY-MM-DDTHH:mm:ss.SSS'; } public dateTimeCast(value) { From de7332fb1b2ec025d37844537b68e65b52978da5 Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Fri, 17 Jan 2025 20:38:44 +0200 Subject: [PATCH 12/14] linter fix --- packages/cubejs-dremio-driver/driver/DremioQuery.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/cubejs-dremio-driver/driver/DremioQuery.js b/packages/cubejs-dremio-driver/driver/DremioQuery.js index 92973ae48ee0c..c46ade9c517df 100644 --- a/packages/cubejs-dremio-driver/driver/DremioQuery.js +++ b/packages/cubejs-dremio-driver/driver/DremioQuery.js @@ -43,7 +43,6 @@ class DremioQuery extends BaseQuery { * @see https://docs.dremio.com/cloud/reference/sql/sql-functions/functions/CONVERT_TIMEZONE/ */ convertTz(field) { - return `CONVERT_TIMEZONE('${this.timezone}', ${field})`; } From b8d6d9424d13f8fc5e87781bc352a0b4953f68f6 Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Fri, 17 Jan 2025 21:23:07 +0200 Subject: [PATCH 13/14] add mysqlUseNamedTimezones flag --- .../configuration/environment-variables.mdx | 11 ++++++ packages/cubejs-backend-shared/src/env.ts | 38 +++++++++++++++++++ .../src/adapter/MysqlQuery.ts | 29 +++++++++----- 3 files changed, 68 insertions(+), 10 deletions(-) diff --git a/docs/pages/reference/configuration/environment-variables.mdx b/docs/pages/reference/configuration/environment-variables.mdx index 475bb32708be5..e1371c3eba781 100644 --- a/docs/pages/reference/configuration/environment-variables.mdx +++ b/docs/pages/reference/configuration/environment-variables.mdx @@ -603,6 +603,16 @@ The cluster name to use when connecting to [Materialize](/product/configuration/ | --------------------------------------------------------- | ---------------------- | --------------------- | | A valid Materialize cluster name | N/A | N/A | +## `CUBEJS_DB_MYSQL_USE_NAMED_TIMEZONES` + +This flag controls how timezones are passed to CONVERT_TZ. If it is set to TRUE - timezone names will be used. +IF it is set to FALSE - numeric offsets will be passed instead. To use named timezones, MySQL Server needs +to be [configured][mysql-server-tz-support] properly. + +| Possible Values | Default in Development | Default in Production | +| ------------------------------------- | ---------------------- | --------------------- | +| Whether to use named timezones or not | `false` | `false` | + ## `CUBEJS_DB_SNOWFLAKE_ACCOUNT` The Snowflake account identifier to use when connecting to the database. @@ -1552,3 +1562,4 @@ The port for a Cube deployment to listen to API connections on. [ref-sql-api]: /product/apis-integrations/sql-api [ref-sql-api-streaming]: /product/apis-integrations/sql-api#streaming [ref-row-limit]: /product/apis-integrations/queries#row-limit +[mysql-server-tz-support]: https://dev.mysql.com/doc/refman/8.4/en/time-zone-support.html diff --git a/packages/cubejs-backend-shared/src/env.ts b/packages/cubejs-backend-shared/src/env.ts index 3d5a2c0e2e81c..b753bd4a86977 100644 --- a/packages/cubejs-backend-shared/src/env.ts +++ b/packages/cubejs-backend-shared/src/env.ts @@ -853,6 +853,44 @@ const variables: Record any> = { return undefined; }, + /** **************************************************************** + * MySQL Driver * + ***************************************************************** */ + + /** + * Use timezone names for date/time conversions. + * Defaults to FALSE, meaning that numeric offsets for timezone will be used. + * @see https://dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html#function_convert-tz + * @see https://dev.mysql.com/doc/refman/8.4/en/time-zone-support.html + */ + mysqlUseNamedTimezones: ({ dataSource }: { dataSource: string }) => { + const val = process.env[ + keyByDataSource( + 'CUBEJS_DB_MYSQL_USE_NAMED_TIMEZONES', + dataSource, + ) + ]; + + if (val) { + if (val.toLocaleLowerCase() === 'true') { + return true; + } else if (val.toLowerCase() === 'false') { + return false; + } else { + throw new TypeError( + `The ${ + keyByDataSource( + 'CUBEJS_DB_MYSQL_USE_NAMED_TIMEZONES', + dataSource, + ) + } must be either 'true' or 'false'.` + ); + } + } else { + return false; + } + }, + /** **************************************************************** * Databricks Driver * ***************************************************************** */ diff --git a/packages/cubejs-schema-compiler/src/adapter/MysqlQuery.ts b/packages/cubejs-schema-compiler/src/adapter/MysqlQuery.ts index e26cf11499063..3bb01cd09d5b8 100644 --- a/packages/cubejs-schema-compiler/src/adapter/MysqlQuery.ts +++ b/packages/cubejs-schema-compiler/src/adapter/MysqlQuery.ts @@ -1,7 +1,5 @@ import moment from 'moment-timezone'; - -import { parseSqlInterval } from '@cubejs-backend/shared'; - +import { getEnv, parseSqlInterval } from '@cubejs-backend/shared'; import { BaseQuery } from './BaseQuery'; import { BaseFilter } from './BaseFilter'; import { UserError } from '../compiler/UserError'; @@ -26,19 +24,30 @@ class MysqlFilter extends BaseFilter { } export class MysqlQuery extends BaseQuery { + private readonly useNamedTimezones: boolean; + + public constructor(compilers: any, options: any) { + super(compilers, options); + + this.useNamedTimezones = getEnv('mysqlUseNamedTimezones', { dataSource: this.dataSource }); + } + public newFilter(filter) { return new MysqlFilter(this, filter); } - public castToString(sql) { + public castToString(sql: string) { return `CAST(${sql} as CHAR)`; } - public convertTz(field) { + public convertTz(field: string) { + if (this.useNamedTimezones) { + return `CONVERT_TZ(${field}, @@session.time_zone, '${this.timezone}')`; + } return `CONVERT_TZ(${field}, @@session.time_zone, '${moment().tz(this.timezone).format('Z')}')`; } - public timeStampCast(value) { + public timeStampCast(value: string) { return `TIMESTAMP(convert_tz(${value}, '+00:00', @@session.time_zone))`; } @@ -46,19 +55,19 @@ export class MysqlQuery extends BaseQuery { return 'YYYY-MM-DDTHH:mm:ss.SSS'; } - public dateTimeCast(value) { + public dateTimeCast(value: string) { return `TIMESTAMP(${value})`; } - public subtractInterval(date, interval) { + public subtractInterval(date: string, interval: string) { return `DATE_SUB(${date}, INTERVAL ${this.formatInterval(interval)})`; } - public addInterval(date, interval) { + public addInterval(date: string, interval: string) { return `DATE_ADD(${date}, INTERVAL ${this.formatInterval(interval)})`; } - public timeGroupedColumn(granularity, dimension) { + public timeGroupedColumn(granularity: string, dimension) { return `CAST(${GRANULARITY_TO_INTERVAL[granularity](dimension)} AS DATETIME)`; } From 6fee249222be6e7a416750ceba5211006befcac8 Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Fri, 17 Jan 2025 22:00:26 +0200 Subject: [PATCH 14/14] fix dremio test --- packages/cubejs-dremio-driver/test/DremioQuery.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cubejs-dremio-driver/test/DremioQuery.test.ts b/packages/cubejs-dremio-driver/test/DremioQuery.test.ts index 94dec6a15aeb3..618ab45415d29 100644 --- a/packages/cubejs-dremio-driver/test/DremioQuery.test.ts +++ b/packages/cubejs-dremio-driver/test/DremioQuery.test.ts @@ -63,7 +63,7 @@ cube(\`sales\`, { const queryAndParams = query.buildSqlAndParams(); expect(queryAndParams[0]).toContain( - 'DATE_TRUNC(\'day\', CONVERT_TIMEZONE(\'-08:00\', "sales".sales_datetime))' + 'DATE_TRUNC(\'day\', CONVERT_TIMEZONE(\'America/Los_Angeles\', "sales".sales_datetime))' ); }));