Skip to content

Commit 5b7d33e

Browse files
authored
Merge branch 'master' into bugfix-special-names-underscores
2 parents 4d29bcc + 59210da commit 5b7d33e

File tree

289 files changed

+4928
-2686
lines changed

Some content is hidden

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

289 files changed

+4928
-2686
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/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 [email protected]
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: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,35 @@
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+
635
## [1.3.20](https://github.com/cube-js/cube/compare/v1.3.19...v1.3.20) (2025-06-06)
736

837
### 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-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/configuration/data-sources/duckdb.mdx

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,23 @@ deployment][ref-demo-deployment] in Cube Cloud.
5959

6060
## Environment Variables
6161

62-
| Environment Variable | Description | Possible Values | Required |
63-
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- | :------: |
64-
| `CUBEJS_DB_DUCKDB_MEMORY_LIMIT` | The maximum memory limit for DuckDB. Equivalent to `SET memory_limit=<MEMORY_LIMIT>`. Default is 75% of available RAM | A valid memory limit |||
65-
| `CUBEJS_DB_DUCKDB_SCHEMA` | The [default search schema][link-duckdb-configuration-ref] | A valid schema name |||
66-
| `CUBEJS_DB_DUCKDB_MOTHERDUCK_TOKEN` | The service token to use for connections to MotherDuck | A valid [MotherDuck service token][motherduck-docs-svc-token] |||
67-
| `CUBEJS_DB_DUCKDB_DATABASE_PATH` | The database filepath to use for connection to a local database. | A valid duckdb database file path |||
68-
| `CUBEJS_DB_DUCKDB_S3_ACCESS_KEY_ID` | The Access Key ID to use for database connections | A valid Access Key ID |||
69-
| `CUBEJS_DB_DUCKDB_S3_SECRET_ACCESS_KEY` | The Secret Access Key to use for database connections | A valid Secret Access Key |||
70-
| `CUBEJS_DB_DUCKDB_S3_ENDPOINT` | The S3 endpoint | A valid [S3 endpoint][duckdb-docs-s3-import] |||
71-
| `CUBEJS_DB_DUCKDB_S3_REGION` | The [region of the bucket][duckdb-docs-s3-import] | A valid AWS region |||
72-
| `CUBEJS_DB_DUCKDB_S3_USE_SSL` | Use SSL for connection | A boolean |||
73-
| `CUBEJS_DB_DUCKDB_S3_URL_STYLE` | To choose the S3 URL style(vhost or path) | 'vhost' or 'path' |||
74-
| `CUBEJS_DB_DUCKDB_S3_SESSION_TOKEN` | The token for the S3 session | A valid Session Token |||
75-
| `CUBEJS_DB_DUCKDB_EXTENSIONS` | A comma-separated list of DuckDB extensions to install and load | A comma-separated list of DuckDB extensions |||
76-
| `CUBEJS_DB_DUCKDB_COMMUNITY_EXTENSIONS` | A comma-separated list of DuckDB community extensions to install and load | A comma-separated list of DuckDB community extensions |||
77-
| `CUBEJS_CONCURRENCY` | The number of [concurrent queries][ref-data-source-concurrency] to the data source | A valid number ||
62+
| Environment Variable | Description | Possible Values | Required |
63+
|--------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------|:--------:|
64+
| `CUBEJS_DB_DUCKDB_MEMORY_LIMIT` | The maximum memory limit for DuckDB. Equivalent to `SET memory_limit=<MEMORY_LIMIT>`. Default is 75% of available RAM | A valid memory limit ||
65+
| `CUBEJS_DB_DUCKDB_SCHEMA` | The [default search schema][link-duckdb-configuration-ref] | A valid schema name ||
66+
| `CUBEJS_DB_DUCKDB_MOTHERDUCK_TOKEN` | The service token to use for connections to MotherDuck | A valid [MotherDuck service token][motherduck-docs-svc-token] ||
67+
| `CUBEJS_DB_DUCKDB_DATABASE_PATH` | The database filepath to use for connection to a local database. | A valid duckdb database file path ||
68+
| `CUBEJS_DB_DUCKDB_S3_ACCESS_KEY_ID` | The Access Key ID to use for database connections | A valid Access Key ID ||
69+
| `CUBEJS_DB_DUCKDB_S3_SECRET_ACCESS_KEY` | The Secret Access Key to use for database connections | A valid Secret Access Key ||
70+
| `CUBEJS_DB_DUCKDB_S3_ENDPOINT` | The S3 endpoint | A valid [S3 endpoint][duckdb-docs-s3-import] ||
71+
| `CUBEJS_DB_DUCKDB_S3_REGION` | The [region of the bucket][duckdb-docs-s3-import] | A valid AWS region ||
72+
| `CUBEJS_DB_DUCKDB_S3_USE_SSL` | Use SSL for connection | A boolean ||
73+
| `CUBEJS_DB_DUCKDB_S3_URL_STYLE` | To choose the S3 URL style(vhost or path) | `vhost` or `path` ||
74+
| `CUBEJS_DB_DUCKDB_S3_SESSION_TOKEN` | The token for the S3 session | A valid Session Token ||
75+
| `CUBEJS_DB_DUCKDB_EXTENSIONS` | A comma-separated list of DuckDB extensions to install and load | A comma-separated list of DuckDB extensions ||
76+
| `CUBEJS_DB_DUCKDB_COMMUNITY_EXTENSIONS` | A comma-separated list of DuckDB community extensions to install and load | A comma-separated list of DuckDB community extensions ||
77+
| `CUBEJS_DB_DUCKDB_S3_USE_CREDENTIAL_CHAIN` | A flag to use credentials chain for secrets for S3 connections | `true`, `false`. Defaults to `false` ||
78+
| `CUBEJS_CONCURRENCY` | The number of [concurrent queries][ref-data-source-concurrency] to the data source | A valid number ||
7879

7980
[ref-data-source-concurrency]: /product/configuration/concurrency#data-source-concurrency
8081

0 commit comments

Comments
 (0)