Skip to content

Commit eefd54a

Browse files
authored
Merge branch 'master' into column-name-quotes-escaping
2 parents 7947087 + 59210da commit eefd54a

File tree

337 files changed

+6895
-2941
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

337 files changed

+6895
-2941
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
set -eo pipefail
3+
4+
# Debug log for test containers
5+
export DEBUG=testcontainers
6+
7+
export TEST_PRESTO_VERSION=341-SNAPSHOT
8+
export TEST_PGSQL_VERSION=12.4
9+
10+
echo "::group::Trino ${TEST_PRESTO_VERSION} with PostgreSQL ${TEST_PGSQL_VERSION}"
11+
docker pull lewuathe/presto-coordinator:${TEST_PRESTO_VERSION}
12+
docker pull lewuathe/presto-worker:${TEST_PRESTO_VERSION}
13+
docker pull postgres:${TEST_PGSQL_VERSION}
14+
yarn lerna run --concurrency 1 --stream --no-prefix integration:trino
15+
echo "::endgroup::"

.github/workflows/drivers-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,8 @@ jobs:
355355
DRIVERS_TESTS_CUBEJS_DB_DATABRICKS_TOKEN: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_DATABRICKS_TOKEN }}
356356
DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AWS_KEY: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AWS_KEY }}
357357
DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AWS_SECRET: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_EXPORT_BUCKET_AWS_SECRET }}
358+
DRIVERS_TESTS_CUBEJS_DB_DATABRICKS_OAUTH_CLIENT_ID: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_DATABRICKS_OAUTH_CLIENT_ID }}
359+
DRIVERS_TESTS_CUBEJS_DB_DATABRICKS_OAUTH_CLIENT_SECRET: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_DATABRICKS_OAUTH_CLIENT_SECRET }}
358360

359361
# Redshift
360362
DRIVERS_TESTS_CUBEJS_DB_REDSHIFT_HOST: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_REDSHIFT_HOST }}

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ jobs:
412412
matrix:
413413
node-version: [22.x]
414414
db: [
415-
'athena', 'bigquery', 'snowflake',
415+
'athena', 'bigquery', 'snowflake', 'trino',
416416
'clickhouse', 'druid', 'elasticsearch', 'mssql', 'mysql', 'postgres', 'prestodb',
417417
'mysql-aurora-serverless', 'crate', 'mongobi', 'firebolt', 'dremio', 'vertica'
418418
]

.github/workflows/rust-cubesql.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ jobs:
5757
run: cd packages/cubejs-backend-native && cargo clippy --locked --workspace --all-targets --keep-going -- -D warnings
5858
- name: Clippy Native (with Python)
5959
run: cd packages/cubejs-backend-native && cargo clippy --locked --workspace --all-targets --keep-going --features python -- -D warnings
60+
- name: Clippy cubenativeutils
61+
run: cd rust/cubenativeutils && cargo clippy --locked --workspace --all-targets --keep-going -- -D warnings
62+
- name: Clippy cubesqlplanner
63+
run: cd rust/cubesqlplanner && cargo clippy --locked --workspace --all-targets --keep-going -- -D warnings
6064

6165
unit:
6266
# We use host instead of cross container, because it's much faster
@@ -85,6 +89,11 @@ jobs:
8589
with:
8690
crate: cargo-llvm-cov
8791
version: "0.6.10"
92+
- name: Install cargo-insta@1.42.0
93+
uses: baptiste0928/cargo-install@v3
94+
with:
95+
crate: cargo-insta
96+
version: "1.42.0"
8897
- name: Unit tests (Rewrite Engine)
8998
env:
9099
CUBESQL_TESTING_CUBE_TOKEN: ${{ secrets.CUBESQL_TESTING_CUBE_TOKEN }}
@@ -94,7 +103,11 @@ jobs:
94103
CUBESQL_REWRITE_TIMEOUT: 60
95104
run: |
96105
cd rust/cubesql
97-
cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
106+
# See https://github.com/taiki-e/cargo-llvm-cov/blob/main/README.md#get-coverage-of-external-tests
107+
# shellcheck source=/dev/null
108+
source <(cargo llvm-cov show-env --export-prefix)
109+
cargo insta test --all-features --workspace --unreferenced reject
110+
cargo llvm-cov report --lcov --output-path lcov.info
98111
- name: Upload code coverage
99112
uses: codecov/codecov-action@v5
100113
with:

CHANGELOG.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,66 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [1.3.22](https://github.com/cube-js/cube/compare/v1.3.21...v1.3.22) (2025-06-18)
7+
8+
### Bug Fixes
9+
10+
- **client-core:** Fix for the issue with Generated SQL tab in playground ([#9675](https://github.com/cube-js/cube/issues/9675)) ([17570d4](https://github.com/cube-js/cube/commit/17570d42a70292a58baba963fd3f8106816a2824))
11+
- **cubejs-cli:** Fix validate command ([#9666](https://github.com/cube-js/cube/issues/9666)) ([b2bc99f](https://github.com/cube-js/cube/commit/b2bc99f3f29a8ba3ad1b07ded6379881668f596a))
12+
- **cubeorchestrator:** Fix serialization of link type format for dimension ([#9649](https://github.com/cube-js/cube/issues/9649)) ([267ce43](https://github.com/cube-js/cube/commit/267ce4374a549b970cef399743a0009f3deb4a35))
13+
- **questdb-driver:** Fix invalid QuestDB timestamp floor year unit ([#9678](https://github.com/cube-js/cube/issues/9678)) ([33012b1](https://github.com/cube-js/cube/commit/33012b1d20a54d63c24f20f7538d2bf504fd24ef))
14+
- **schema-compiler:** Case insensitive filter for ClickHouse ([#9373](https://github.com/cube-js/cube/issues/9373)) ([273d277](https://github.com/cube-js/cube/commit/273d277e1058feff36796c48cf0fb315a8211ced))
15+
- **schema-compiler:** Fix Access Policy inheritance ([#9648](https://github.com/cube-js/cube/issues/9648)) ([896af5e](https://github.com/cube-js/cube/commit/896af5eaeccec00c88463fa518e98bf374acdc9b))
16+
- **tesseract:** Fix rolling window external pre-aggregation ([#9625](https://github.com/cube-js/cube/issues/9625)) ([aae3b05](https://github.com/cube-js/cube/commit/aae3b05f49222009f57e407c52d7288bb33b9b8a))
17+
- **tesseract:** Fix rolling window with few time dimensions, filter_group in segments and member expressions ([#9673](https://github.com/cube-js/cube/issues/9673)) ([98d334b](https://github.com/cube-js/cube/commit/98d334bb8ee4debe49b428c92581f63596f3f56c))
18+
- **tesseract:** Fix typo in interval ([#9680](https://github.com/cube-js/cube/issues/9680)) ([9b75d99](https://github.com/cube-js/cube/commit/9b75d99a08abfd54a075e61a3040e14c034a5169))
19+
- **tesseract:** Handle JS exceptions in Rust with safe call ([#9677](https://github.com/cube-js/cube/issues/9677)) ([bb6d655](https://github.com/cube-js/cube/commit/bb6d6557b7c39267660dd3ae59ff341881c41a4b))
20+
21+
### Features
22+
23+
- **duckdb-driver:** Add support for using default credential provider chain for duckdb s3 access ([#9679](https://github.com/cube-js/cube/issues/9679)) ([89f54e9](https://github.com/cube-js/cube/commit/89f54e91af72e5d671268472d3ff04ebb841d1ed))
24+
- **prestodb-driver, trino-driver:** Support dbUseSelectTestConnection flag ([#9663](https://github.com/cube-js/cube/issues/9663)) ([97b6bb4](https://github.com/cube-js/cube/commit/97b6bb43b9f3dd7209a8aa164680be76dcfc9f45))
25+
- **schema-compiler:** Add support for time dimensions with granularities in multi-stage measures add_group_by ([#9657](https://github.com/cube-js/cube/issues/9657)) ([6700b43](https://github.com/cube-js/cube/commit/6700b432cc22d71b4b8ef650e835ba0cb33cf91c))
26+
27+
## [1.3.21](https://github.com/cube-js/cube/compare/v1.3.20...v1.3.21) (2025-06-10)
28+
29+
### Bug Fixes
30+
31+
- **client-vue3:** Prevent heuristic call when initial query is empty in computed property validateQuery ([#9656](https://github.com/cube-js/cube/issues/9656)) ([622b266](https://github.com/cube-js/cube/commit/622b26601e6bde3f15fb1cfc5ff53daff5cb6ed9))
32+
- Report more accurate time to APM on heavy used deployments ([#9667](https://github.com/cube-js/cube/issues/9667)) ([a900c78](https://github.com/cube-js/cube/commit/a900c787d3724ebdd241cb0e4f4562e37f81ce14))
33+
- **schema-compiler:** Fix pre-aggregation for time dimension matching ([#9669](https://github.com/cube-js/cube/issues/9669)) ([0914e1e](https://github.com/cube-js/cube/commit/0914e1ed89b7d1cf8f3bf8dc19858aeaf4b779a7))
34+
35+
## [1.3.20](https://github.com/cube-js/cube/compare/v1.3.19...v1.3.20) (2025-06-06)
36+
37+
### Bug Fixes
38+
39+
- **cubesql:** Fix Tableau relative dates ([#9641](https://github.com/cube-js/cube/issues/9641)) ([18ec4fc](https://github.com/cube-js/cube/commit/18ec4fc4fcd9ea94799241dc3f8ce9c7ac531b4a))
40+
- **cubestore:** Delete old metastore snapshots in batches, after updating metastore-current ([#9647](https://github.com/cube-js/cube/issues/9647)) ([1104bde](https://github.com/cube-js/cube/commit/1104bde3307b4e5fd941c731305d8faa67ac803f))
41+
- **schema-compiler:** Support for `export function xxx()` during transpilation ([#9645](https://github.com/cube-js/cube/issues/9645)) ([9bcb5a1](https://github.com/cube-js/cube/commit/9bcb5a16ae0c3f1b36d80ce4fcdfab20586b0b8a))
42+
- **tesseract:** Removed unnecessary pushdown of measure filters in multistage queries ([#9650](https://github.com/cube-js/cube/issues/9650)) ([265580f](https://github.com/cube-js/cube/commit/265580f59437ff762118e79e469e157da548d4aa))
43+
44+
### Features
45+
46+
- **cubesql:** Support `PERCENTILE_CONT` SQL push down ([#8697](https://github.com/cube-js/cube/issues/8697)) ([577a09f](https://github.com/cube-js/cube/commit/577a09f498085ca5a7950467e602dee54691e88e))
47+
- **databricks-jdbc-driver:** Support M2M OAuth Authentication ([#9651](https://github.com/cube-js/cube/issues/9651)) ([71c1022](https://github.com/cube-js/cube/commit/71c10226f7c797e8b63df248fc704f2a2f1b7452))
48+
- **prestodb-driver, trino-driver:** Support custom auth headers (JWT) ([#9660](https://github.com/cube-js/cube/issues/9660)) ([3219695](https://github.com/cube-js/cube/commit/32196950d2c54ce482f686ae61c978a0c375e2f8))
49+
- **trino-driver:** Add special testConnection for Trino ([#9634](https://github.com/cube-js/cube/issues/9634)) ([ae10a76](https://github.com/cube-js/cube/commit/ae10a767636322a7fcff21ca6b648b4a0374aad2))
50+
51+
## [1.3.19](https://github.com/cube-js/cube/compare/v1.3.18...v1.3.19) (2025-06-02)
52+
53+
### Bug Fixes
54+
55+
- **client-vue3:** Avoid Maximum recursive updates exceeded ([5d5f7da](https://github.com/cube-js/cube/commit/5d5f7da1dd7ad69b0db6ce9f33973efcc08879c5))
56+
- **cubesql:** Fix "Tracker memory shrink underflow" error ([#9624](https://github.com/cube-js/cube/issues/9624)) ([d3af150](https://github.com/cube-js/cube/commit/d3af1506d845276a5b7fd97c5d8543d2cf03a1e0))
57+
- **cubesql:** Quote subquery joins alias in SQL push down to cube ([#9629](https://github.com/cube-js/cube/issues/9629)) ([89b00cf](https://github.com/cube-js/cube/commit/89b00cf76dfbbfd06f0412d6e80178f0fdb9f46c))
58+
59+
### Features
60+
61+
- **cubesql:** Support `date_trunc != literal date` filter ([#9627](https://github.com/cube-js/cube/issues/9627)) ([2b36aae](https://github.com/cube-js/cube/commit/2b36aae5e93f88f4cca6059067bee047c32f4d24))
62+
- **cubesql:** Support round() function with two parameters ([#9594](https://github.com/cube-js/cube/issues/9594)) ([8cd1dfe](https://github.com/cube-js/cube/commit/8cd1dfec1b18b246ed8f24f4d7c33a91556a4afa))
63+
- Expose aliasMember for hierarchy in View ([#9636](https://github.com/cube-js/cube/issues/9636)) ([737caab](https://github.com/cube-js/cube/commit/737caabf2a43bc28ea0ad90085f44ffbaa1b292b))
64+
- **schema-compiler:** add quarter granularity support in SqliteQuery using CASE expression ([#9633](https://github.com/cube-js/cube/issues/9633)) ([c7ae936](https://github.com/cube-js/cube/commit/c7ae9365eaf333e995d2536101ebe7dec1daf16a))
65+
666
## [1.3.18](https://github.com/cube-js/cube/compare/v1.3.17...v1.3.18) (2025-05-27)
767

868
### Bug Fixes

CONTRIBUTING.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,15 @@ To enhance the adoption of community-contributed drivers, we decided to split th
126126
4. Posting a backlink to an open-source repository would be a good idea here so people can provide feedback on it by posting issues.
127127
5. Before creating PR for the main repository, please make sure it's tested with the standard Cube E2E testing suite. An example of an E2E testing suite can be found here: https://github.com/cube-js/cube/blob/master/packages/cubejs-testing/test/driver-postgres.test.ts
128128
6. If you're creating PR for the main repo, please be prepared to become a maintainer for this driver and dedicate some time to it. There're no specific time requirements. As a rule of thumb, you should expect to spend time on a weekly basis.
129-
7. Due to limited resources Core team will review and merge driver PRs based on popularity and development activity.
129+
7. Due to limited resources Core team will review and merge driver PRs based on popularity and development activity. Preference is given to drivers that are used by a significant number of users.
130130

131131
### Implementing a Driver
132132

133133
1. Copy existing driver package structure and name it in `@cubejs-backend/<db-name>-driver` format.
134134
`@cubejs-backend/mysql-driver` is a very good candidate for copying this structure.
135135
2. Please do not copy *CHANGELOG.md*.
136136
3. Name driver class and adjust package.json, README.md accordingly.
137-
4. As a rule of thumb please use only Pure JS libraries as a dependencies where possible.
137+
4. As a rule of thumb please use only pure JS libraries as a dependencies where possible.
138138
It increases driver adoption rate a lot.
139139
5. Typically, you need to implement only `query()` and `testConnection()` methods of driver.
140140
The rest will be done by `BaseDriver` class.
@@ -145,10 +145,9 @@ The rest will be done by `BaseDriver` class.
145145

146146
### Implementing a JDBC Driver
147147

148-
If there's existing JDBC Driver in place for Database of interest you can just create `DbTypes` configuration inside
149-
[cubejs-jdbc-driver/driver/JDBCDriver.ts](https://github.com/cube-js/cube/blob/master/packages/cubejs-jdbc-driver/src/JDBCDriver.ts).
150-
Most of the time no additional adjustments required for base `JDBCDriver` implementation as JDBC is pretty standard.
151-
In case you need to tweak it a little please follow [Implementing Driver](#implementing-driver) steps but use `JDBCDriver` as your base driver class.
148+
It is recommended to implement native, non-JDBC drivers for databases. Even though implementing
149+
a JDBC driver might seem like a quick solution, its reliance on external libraries makes it
150+
harder to maintain. Also, such drivers often lack support for important features, such as export buckets and various authentication methods.
152151

153152
### Implementing SQL Dialect
154153

docs/pages/product/apis-integrations.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ tools][ref-viz-tools]. Some of the features with partial support are listed belo
4848
| Feature | ✅ Supported in | ❌ Not supported in |
4949
| --- | --- | --- |
5050
| [Hierarchies][ref-hierarchies] | [Microsoft Power BI][ref-powerbi] via the [DAX API][ref-dax-api]<br/>[Cube Cloud for Excel][ref-cube-cloud-for-excel]<br/>[Cube Cloud for Sheets][ref-cube-cloud-for-sheets]<br/>[Tableau][ref-tableau] via [Semantic Layer Sync][ref-sls] | All other tools |
51-
| [Folders][ref-folders] | [Microsoft Power BI][ref-powerbi] via the [DAX API][ref-dax-api]<br/>[Cube Cloud for Excel][ref-cube-cloud-for-excel]<br/>[Cube Cloud for Sheets][ref-cube-cloud-for-sheets]<br/>[Tableau][ref-tableau] via [Semantic Layer Sync][ref-sls] | All other tools |
51+
| [Folders][ref-folders] | [Microsoft Power BI][ref-powerbi] via the [DAX API][ref-dax-api]<br/>[Cube Cloud for Excel][ref-cube-cloud-for-excel]<br/>[Cube Cloud for Sheets][ref-cube-cloud-for-sheets]<br/>[Tableau][ref-tableau] via [Semantic Layer Sync][ref-sls]<br/>[Apache Superset][ref-superset] via [Semantic Layer Sync][ref-sls]<br/>[Preset][ref-preset] via [Semantic Layer Sync][ref-sls] | All other tools |
5252

5353
### Authentication methods
5454

@@ -94,3 +94,5 @@ API][ref-orchestration-api].
9494
[ref-auth-jwt]: /product/auth/methods/jwt
9595
[ref-auth-kerberos]: /product/auth/methods/kerberos
9696
[ref-auth-ntlm]: /product/auth/methods/ntlm
97+
[ref-superset]: /product/configuration/visualization-tools/superset
98+
[ref-preset]: /product/configuration/visualization-tools/superset

docs/pages/product/apis-integrations/mdx-api.mdx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,19 @@ To enable or disable the MDX API on a specific deployment, go to <Btn>Settings</
4040
in the Cube Cloud sidebar, then <Btn>Configuration</Btn>, and then toggle the
4141
<Btn>Enable MDX API</Btn> option.
4242

43+
### Performance considerations
44+
45+
To ensure the best user experience in Excel, the MDX API should be able to respond to
46+
requests with a subsecond latency. Consider the following recommendations:
47+
48+
- The [deployment][ref-deployment] should be collocated with users, so deploy it a region
49+
that is closest to your users.
50+
- Queries should hit [pre-aggregations][ref-pre-aggregations] whenever possible. Consider
51+
turning on the [rollup-only mode][ref-rollup-only-mode] to disallow queries that go
52+
directly to the upstream data source.
53+
- If some queries still go to the upstream data source, it should respond with a
54+
subsecond latency. Consider tuning the concurrency and quotas to achieve that.
55+
4356
## Using MDX API with Excel
4457

4558
<InfoBox>
@@ -178,4 +191,7 @@ Authentication and authorization work the same as for the [SQL API](/product/api
178191
[ref-cube-cloud-for-excel]: /product/apis-integrations/microsoft-excel
179192
[ref-hierarchies]: /product/data-modeling/reference/hierarchies
180193
[ref-folders]: /product/data-modeling/reference/view#folders
181-
[ref-views]: /product/data-modeling/concepts#views
194+
[ref-views]: /product/data-modeling/concepts#views
195+
[ref-deployment]: /product/deployment/cloud/deployments
196+
[ref-pre-aggregations]: /product/caching/using-pre-aggregations
197+
[ref-rollup-only-mode]: /product/caching/using-pre-aggregations#rollup-only-mode

docs/pages/product/apis-integrations/microsoft-excel.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ looks and feels like [Playground][ref-playground].
7878

7979
<InfoBox>
8080

81-
Google Cloud for Excel works only with [views][ref-views], not cubes.
81+
Cube Cloud for Excel works only with [views][ref-views], not cubes.
8282

8383
</InfoBox>
8484

0 commit comments

Comments
 (0)