Skip to content

Commit dd46e65

Browse files
authored
Merge branch 'master' into patch-1
2 parents 6499d71 + 5eb0554 commit dd46e65

File tree

1,915 files changed

+80370
-503236
lines changed

Some content is hidden

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

1,915 files changed

+80370
-503236
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
**
22
!package.json
33
!tsconfig.base.json
4+
!tsconfig.json
45
!rollup.config.js
56
!yarn.lock
67
!lerna.json

.github/actions/codecov-fix.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../" && pwd)"
6+
7+
for path in "$repo_root"/packages/*/coverage/lcov.info; do
8+
[ -f "$path" ] || continue
9+
10+
pkg_dir="$(dirname "$path")" # packages/foo/coverage
11+
pkg_root="$(dirname "$pkg_dir")" # packages/foo
12+
tmp_path="$pkg_dir/lcov.fixed.info"
13+
14+
sed "s|SF:src/|SF:packages/$(basename "$pkg_root")/src/|g" "$path" > "$tmp_path"
15+
done

.github/workflows/drivers-tests.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,19 @@ on:
5757
# To test SQL API Push down
5858
- 'packages/cubejs-backend-native/**'
5959
- 'rust/cubesql/**'
60+
workflow_dispatch:
61+
inputs:
62+
use_tesseract_sql_planner:
63+
description: 'Enable TESSERACT_SQL_PLANNER?'
64+
required: true
65+
default: 'false'
66+
type: choice
67+
options:
68+
- 'true'
69+
- 'false'
6070

6171
env:
62-
CUBEJS_TESSERACT_ORCHESTRATOR: true
72+
USE_TESSERACT_SQL_PLANNER: false
6373

6474
jobs:
6575
latest-tag-sha:
@@ -205,6 +215,7 @@ jobs:
205215
athena-export-bucket-s3
206216
bigquery-export-bucket-gcs
207217
clickhouse-export-bucket-s3
218+
clickhouse-export-bucket-s3-prefix
208219
databricks-jdbc
209220
databricks-jdbc-export-bucket-s3
210221
databricks-jdbc-export-bucket-s3-prefix
@@ -217,9 +228,12 @@ jobs:
217228
snowflake
218229
snowflake-encrypted-pk
219230
snowflake-export-bucket-s3
231+
snowflake-export-bucket-s3-prefix
220232
snowflake-export-bucket-azure
233+
snowflake-export-bucket-azure-prefix
221234
snowflake-export-bucket-azure-via-storage-integration
222235
snowflake-export-bucket-gcs
236+
snowflake-export-bucket-gcs-prefix
223237
# As per docs:
224238
# Secrets cannot be directly referenced in if: conditionals. Instead, consider setting
225239
# secrets as job-level environment variables, then referencing the environment variables
@@ -232,6 +246,7 @@ jobs:
232246
- bigquery-export-bucket-gcs
233247
- clickhouse
234248
- clickhouse-export-bucket-s3
249+
- clickhouse-export-bucket-s3-prefix
235250
- databricks-jdbc
236251
- databricks-jdbc-export-bucket-s3
237252
- databricks-jdbc-export-bucket-s3-prefix
@@ -247,9 +262,12 @@ jobs:
247262
- snowflake
248263
- snowflake-encrypted-pk
249264
- snowflake-export-bucket-s3
265+
- snowflake-export-bucket-s3-prefix
250266
- snowflake-export-bucket-azure
267+
- snowflake-export-bucket-azure-prefix
251268
- snowflake-export-bucket-azure-via-storage-integration
252269
- snowflake-export-bucket-gcs
270+
- snowflake-export-bucket-gcs-prefix
253271
fail-fast: false
254272

255273
steps:
@@ -316,6 +334,8 @@ jobs:
316334
(contains(env.CLOUD_DATABASES, matrix.database) && env.DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY != '') ||
317335
(!contains(env.CLOUD_DATABASES, matrix.database))
318336
env:
337+
DRIVERS_TESTS_CUBEJS_TESSERACT_SQL_PLANNER: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.use_tesseract_sql_planner || env.USE_TESSERACT_SQL_PLANNER }}
338+
319339
# Athena
320340
DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY: ${{ secrets.DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY }}
321341
DRIVERS_TESTS_ATHENA_CUBEJS_AWS_SECRET: ${{ secrets.DRIVERS_TESTS_ATHENA_CUBEJS_AWS_SECRET }}

.github/workflows/push.yml

Lines changed: 53 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,21 @@ jobs:
120120
run: yarn build
121121
- name: Lerna test
122122
run: yarn lerna run --concurrency 1 --stream --no-prefix unit
123-
- name: Upload coverage reports to Codecov
124-
uses: codecov/codecov-action@v5
125-
if: (matrix.node-version == '22.x')
126-
with:
127-
token: ${{ secrets.CODECOV_TOKEN }}
128-
files: ./packages/*/coverage/*
129-
verbose: true
130-
flags: cube-backend
131-
fail_ci_if_error: false
123+
- name: Fix lcov paths
124+
if: (matrix.node-version == '22.x' && matrix.transpile-worker-threads == true)
125+
run: |
126+
./.github/actions/codecov-fix.sh
127+
- name: Combine all fixed LCOV files
128+
if: (matrix.node-version == '22.x' && matrix.transpile-worker-threads == true)
129+
run: |
130+
echo "" > ./combined-unit.lcov
131+
find ./packages -type f -name lcov.fixed.info -exec cat {} + >> ./combined-unit.lcov || true
132+
- name: Upload coverage artifact
133+
if: (matrix.node-version == '22.x' && matrix.transpile-worker-threads == true)
134+
uses: actions/upload-artifact@v4
135+
with:
136+
name: coverage-unit
137+
path: ./combined-unit.lcov
132138

133139
lint:
134140
runs-on: ubuntu-24.04
@@ -496,6 +502,18 @@ jobs:
496502
# Snowflake
497503
DRIVERS_TESTS_SNOWFLAKE_CUBEJS_DB_USER: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_SNOWFLAKE_USER }}
498504
DRIVERS_TESTS_SNOWFLAKE_CUBEJS_DB_PASS: ${{ secrets.DRIVERS_TESTS_CUBEJS_DB_SNOWFLAKE_PASS }}
505+
- name: Fix lcov paths
506+
run: |
507+
./.github/actions/codecov-fix.sh
508+
- name: Combine all fixed LCOV files
509+
run: |
510+
echo "" > ./combined-integration-${{ matrix.db }}.lcov
511+
find ./packages -type f -name lcov.fixed.info -exec cat {} + >> ./combined-integration-${{ matrix.db }}.lcov || true
512+
- name: Upload coverage artifact
513+
uses: actions/upload-artifact@v4
514+
with:
515+
name: coverage-integration-${{ matrix.db }}
516+
path: ./combined-integration-${{ matrix.db }}.lcov
499517

500518
integration-smoke:
501519
needs: [latest-tag-sha, build-cubestore, build-native-linux]
@@ -778,3 +796,29 @@ jobs:
778796
with:
779797
name: cypress-screenshots-docker-dev-${{ matrix.name }}
780798
path: packages/cubejs-testing/cypress/screenshots
799+
800+
upload-coverage:
801+
name: Upload merged coverage to Codecov
802+
needs: [unit, integration]
803+
runs-on: ubuntu-latest
804+
permissions:
805+
contents: read
806+
actions: read
807+
steps:
808+
- name: Install Codecov CLI
809+
run: |
810+
curl -Os https://uploader.codecov.io/latest/linux/codecov
811+
chmod +x codecov
812+
- name: Download all coverage artifacts
813+
uses: actions/download-artifact@v4
814+
with:
815+
path: all-coverage
816+
- name: Merge all coverage files
817+
run: |
818+
find all-coverage -name '*.lcov' -exec cat {} + > merged-coverage.info
819+
- name: Upload merged coverage to Codecov
820+
run: |
821+
./codecov --token "${{ secrets.CODECOV_TOKEN }}" \
822+
--file ./merged-coverage.info \
823+
--flags cube-backend \
824+
--name "cube backend coverage"

CHANGELOG.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,79 @@
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.16](https://github.com/cube-js/cube/compare/v1.3.15...v1.3.16) (2025-05-19)
7+
8+
### Bug Fixes
9+
10+
- **backend-native:** Fix load response serialization (that breaks cubeApi further processing) ([#9575](https://github.com/cube-js/cube/issues/9575)) ([4b87403](https://github.com/cube-js/cube/commit/4b8740318300584809ff70e280a41dc981be948e))
11+
- **schema-compiler:** Collect join hints from subquery join conditions ([#9554](https://github.com/cube-js/cube/issues/9554)) ([cbf0bfd](https://github.com/cube-js/cube/commit/cbf0bfddafc8629ce7d09d9b73d8b60da6d7bafb))
12+
13+
### Features
14+
15+
- **clickhouse-driver:** Add support for S3 Bucket with paths ([#9585](https://github.com/cube-js/cube/issues/9585)) ([2e47147](https://github.com/cube-js/cube/commit/2e4714721ef166b76432bfdd374db57bff886b7b))
16+
- **client-core:** Add signal option to support abort fetch ([#9539](https://github.com/cube-js/cube/issues/9539)) ([2536dfc](https://github.com/cube-js/cube/commit/2536dfcd993055ad1cf94ae698265cd58b6be59f))
17+
- **cubesql:** Push down `DATE_TRUNC` expressions as member expressions with granularity ([#9583](https://github.com/cube-js/cube/issues/9583)) ([b9c97cd](https://github.com/cube-js/cube/commit/b9c97cd6c169b6d359575649bd845f735ff1a516))
18+
- **tesseract:** Initial BigQuery support ([#9577](https://github.com/cube-js/cube/issues/9577)) ([60ad2f0](https://github.com/cube-js/cube/commit/60ad2f034d760220c81f7ff9794a388ba5dfbdc5))
19+
20+
## [1.3.15](https://github.com/cube-js/cube/compare/v1.3.14...v1.3.15) (2025-05-15)
21+
22+
### Bug Fixes
23+
24+
- **schema-compiler:** Fix timeshift measure queries coming from SQL API ([#9570](https://github.com/cube-js/cube/issues/9570)) ([d94afeb](https://github.com/cube-js/cube/commit/d94afebbbca9de2eb17fdcfcdb43fa9e64ad1735))
25+
26+
## [1.3.14](https://github.com/cube-js/cube/compare/v1.3.13...v1.3.14) (2025-05-13)
27+
28+
### Bug Fixes
29+
30+
- **schema-compiler:** Fix view queries for measure with single timeshift reference without time dimension ([#9565](https://github.com/cube-js/cube/issues/9565)) ([d3c28d4](https://github.com/cube-js/cube/commit/d3c28d48b470d7ee052107ed10d4bce6a324eef2))
31+
32+
### Features
33+
34+
- Rewrite joins from SQL as query-level join hints ([#9561](https://github.com/cube-js/cube/issues/9561)) ([2b2ac1c](https://github.com/cube-js/cube/commit/2b2ac1c47898f4f6bf67ebae658f90b768c63a7a))
35+
36+
## [1.3.13](https://github.com/cube-js/cube/compare/v1.3.12...v1.3.13) (2025-05-12)
37+
38+
### Features
39+
40+
- introduce "protocol" and "method" props for request param in checkSqlAuth ([#9525](https://github.com/cube-js/cube/issues/9525)) ([401a845](https://github.com/cube-js/cube/commit/401a84584f418e2b4bdabe13766ac213646e0924))
41+
42+
## [1.3.12](https://github.com/cube-js/cube/compare/v1.3.11...v1.3.12) (2025-05-08)
43+
44+
### Bug Fixes
45+
46+
- **query-orchestrator:** Correct local date parsing for partition start/end queries ([#9543](https://github.com/cube-js/cube/issues/9543)) ([20dd8ad](https://github.com/cube-js/cube/commit/20dd8ad10f6ad0fc2538aecd0ff82cd43f6ff680))
47+
- **schema-compiler:** Fix filtering by time measure ([#9544](https://github.com/cube-js/cube/issues/9544)) ([00a589f](https://github.com/cube-js/cube/commit/00a589fa3fb324ee3dde36fead0de7ced3d19e5b))
48+
- **schema-compiler:** Fix rendered references for preaggregations with join paths ([#9528](https://github.com/cube-js/cube/issues/9528)) ([98ef928](https://github.com/cube-js/cube/commit/98ef928ece7385c2b41a359dfe0ebcc78dfaf8ee))
49+
- **schema-compiler:** Fix view queries with timeShift members ([#9556](https://github.com/cube-js/cube/issues/9556)) ([ef3a04b](https://github.com/cube-js/cube/commit/ef3a04b28c9e0b804a2a24fb4046e3d4755e8abe))
50+
- **schema-compiler:** Reject pre-agg if measure is unmultiplied in query but multiplied in pre-agg ([#9541](https://github.com/cube-js/cube/issues/9541)) ([f094d09](https://github.com/cube-js/cube/commit/f094d09e25b606001cbb699b82427dc43f19a6dc))
51+
- Throw a user-friendly error on an empty cube.py file ([#9550](https://github.com/cube-js/cube/issues/9550)) ([d69222c](https://github.com/cube-js/cube/commit/d69222cecdf4b3bdfebfaaadc18bbd665d005757))
52+
53+
### Features
54+
55+
- **cubestore:** Add `XIRR` aggregate function to Cube Store ([#9520](https://github.com/cube-js/cube/issues/9520)) ([785142d](https://github.com/cube-js/cube/commit/785142d1c8ecc89cadaa7696c9f58b34115d929b))
56+
- **schema-compiler:** Allow one measure timeShift without time dimension ([#9545](https://github.com/cube-js/cube/issues/9545)) ([320484f](https://github.com/cube-js/cube/commit/320484fc03f0c49efe0ada2ac9d3dce443011ab9))
57+
- **tesseract:** Basic pre-aggregations support ([#9434](https://github.com/cube-js/cube/issues/9434)) ([1deddcc](https://github.com/cube-js/cube/commit/1deddcc4e37795bf2f775770798acefdbeb24c71))
58+
59+
## [1.3.11](https://github.com/cube-js/cube/compare/v1.3.10...v1.3.11) (2025-05-05)
60+
61+
### Features
62+
63+
- **cubesql:** Data source per member ([#9537](https://github.com/cube-js/cube/issues/9537)) ([c0be00c](https://github.com/cube-js/cube/commit/c0be00cd4e5239b52116e38e0f5bf8d846e57090))
64+
- **snowflake-driver:** Upgrade snowflake-sdk from 2.0.3 to 2.0.4 ([#9527](https://github.com/cube-js/cube/issues/9527)) ([8cc6346](https://github.com/cube-js/cube/commit/8cc6346a0daaf35706155671f34bf2cb387b6ad7))
65+
66+
## [1.3.10](https://github.com/cube-js/cube/compare/v1.3.9...v1.3.10) (2025-05-01)
67+
68+
### Bug Fixes
69+
70+
- **cubesql:** Disable filter pushdown over Filter(CrossJoin) ([#9474](https://github.com/cube-js/cube/issues/9474)) ([940c30f](https://github.com/cube-js/cube/commit/940c30f81c0d0f73bcc58bc80d3b673d484cc067))
71+
72+
### Features
73+
74+
- **backend-native:** Allow importing modules from python files within `cube.py` and `globals.py` ([#9490](https://github.com/cube-js/cube/issues/9490)) ([b8ebf15](https://github.com/cube-js/cube/commit/b8ebf15294faa118303112a2d94990dac884e9dd))
75+
- **cubesql:** SQL push down complex window expressions ([#8788](https://github.com/cube-js/cube/issues/8788)) ([2b1bb28](https://github.com/cube-js/cube/commit/2b1bb284e1413a13f96df62fe712c61aee32fd68))
76+
- **cubesql:** Support trivial casts in member pushdown ([#9480](https://github.com/cube-js/cube/issues/9480)) ([85c27a9](https://github.com/cube-js/cube/commit/85c27a928a773245163406d0262c7a5bc69c69bb))
77+
- **databricks-jdbc-driver:** Implement connection checking without waking up SQL warehouse ([#9529](https://github.com/cube-js/cube/issues/9529)) ([044341e](https://github.com/cube-js/cube/commit/044341ee1812c3a2c95c57fb20a2efeaa4e8d803))
78+
679
## [1.3.9](https://github.com/cube-js/cube/compare/v1.3.8...v1.3.9) (2025-04-28)
780

881
### Bug Fixes

codecov.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ coverage:
1010
patch:
1111
default:
1212
informational: true
13+
14+
github_checks:
15+
annotations: false

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"classnames": "^2.3.2",
2222
"cubedev-tracking": "^1.1.0",
2323
"date-fns": "^2.30.0",
24-
"next": "^14.2.21",
24+
"next": "^14.2.26",
2525
"next-sitemap": "^4.1.3",
2626
"nextra": "^2.13.2",
2727
"nextra-theme-docs": "^2.4.0",

docs/pages/guides/recipes.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ These recipes will show you the best practices of using Cube.
1010
### Analytics
1111

1212
- [Calculating daily, weekly, monthly active users](/guides/recipes/analytics/active-users)
13+
- [Calculating the internal rate of return (XIRR)](/guides/recipes/analytics/xirr)
1314
- [Implementing event analytics](/guides/recipes/analytics/event-analytics)
1415
- [Implementing funnel analysis](/guides/recipes/analytics/funnels)
1516
- [Implementing retention analysis & cohorts](/guides/recipes/analytics/cohort-retention)

docs/pages/guides/recipes/analytics/_meta.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = {
22
"active-users": "Daily, Weekly, Monthly Active Users (DAU, WAU, MAU)",
3+
"xirr": "XIRR",
34
"event-analytics": "Implementing event analytics",
45
"cohort-retention": "Implementing retention analysis & cohorts",
56
"funnels": "Implementing Funnel Analysis"

0 commit comments

Comments
 (0)