Skip to content

Commit e9424e2

Browse files
authored
Merge branch 'cube-js:master' into master
2 parents c4e8bcb + e661d2a commit e9424e2

File tree

225 files changed

+6076
-2090
lines changed

Some content is hidden

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

225 files changed

+6076
-2090
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
set -eo pipefail
3+
4+
# Debug log for test containers
5+
export DEBUG=testcontainers
6+
7+
echo "::group::Dremio [cloud]"
8+
yarn lerna run --concurrency 1 --stream --no-prefix integration:dremio
9+
10+
echo "::endgroup::"

.github/workflows/push.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ jobs:
316316
env:
317317
CLOUD_DATABASES: >
318318
firebolt
319+
dremio
319320
# Athena (just to check for secrets availability)
320321
DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY: ${{ secrets.DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY }}
321322

@@ -324,7 +325,7 @@ jobs:
324325
node-version: [20.x]
325326
db: [
326327
'clickhouse', 'druid', 'elasticsearch', 'mssql', 'mysql', 'postgres', 'prestodb',
327-
'mysql-aurora-serverless', 'crate', 'mongobi', 'firebolt'
328+
'mysql-aurora-serverless', 'crate', 'mongobi', 'firebolt', 'dremio'
328329
]
329330
fail-fast: false
330331

@@ -386,6 +387,10 @@ jobs:
386387
DRIVERS_TESTS_FIREBOLT_CUBEJS_FIREBOLT_ACCOUNT: ${{ secrets.DRIVERS_TESTS_FIREBOLT_CUBEJS_FIREBOLT_ACCOUNT }}
387388
DRIVERS_TESTS_FIREBOLT_CUBEJS_DB_USER: ${{ secrets.DRIVERS_TESTS_FIREBOLT_CUBEJS_DB_USER }}
388389
DRIVERS_TESTS_FIREBOLT_CUBEJS_DB_PASS: ${{ secrets.DRIVERS_TESTS_FIREBOLT_CUBEJS_DB_PASS }}
390+
# Dremio Integration
391+
DRIVERS_TESTS_DREMIO_CUBEJS_DB_URL: ${{ secrets.DRIVERS_TESTS_DREMIO_CUBEJS_DB_URL }}
392+
DRIVERS_TESTS_DREMIO_CUBEJS_DB_NAME: ${{ secrets.DRIVERS_TESTS_DREMIO_CUBEJS_DB_NAME }}
393+
DRIVERS_TESTS_DREMIO_CUBEJS_DB_DREMIO_AUTH_TOKEN: ${{ secrets.DRIVERS_TESTS_DREMIO_CUBEJS_DB_DREMIO_AUTH_TOKEN }}
389394

390395
integration-smoke:
391396
needs: [ latest-tag-sha, build-cubestore ]

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,39 @@
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.1.11](https://github.com/cube-js/cube/compare/v1.1.10...v1.1.11) (2024-12-16)
7+
8+
9+
### Bug Fixes
10+
11+
* TypeError: Cannot read properties of undefined (reading 'joins') ([14adaeb](https://github.com/cube-js/cube/commit/14adaebdd1c3d398bcd2997012da070999e47d9d))
12+
13+
14+
15+
16+
17+
## [1.1.10](https://github.com/cube-js/cube/compare/v1.1.9...v1.1.10) (2024-12-16)
18+
19+
20+
### Bug Fixes
21+
22+
* **api-gateway:** allow switch sql user when the new user is the same ([#9037](https://github.com/cube-js/cube/issues/9037)) ([a69c28f](https://github.com/cube-js/cube/commit/a69c28f524fa0625b825b98a38e7f5a211a98f74))
23+
* **api-gateway:** make sure DAP works sql pushdown ([#9021](https://github.com/cube-js/cube/issues/9021)) ([23695b2](https://github.com/cube-js/cube/commit/23695b2b5e886b5b7daf8b3f74003bb04e5b2e0b))
24+
* **cubestore:** Allow create an index from expressions ([#9006](https://github.com/cube-js/cube/issues/9006)) ([222cab8](https://github.com/cube-js/cube/commit/222cab897c289bfc929f217483e4905204bac12f))
25+
* **schema-compiler:** fix DAP with query_rewrite and python config ([#9033](https://github.com/cube-js/cube/issues/9033)) ([849790f](https://github.com/cube-js/cube/commit/849790f965dd0d9fddba11e3d8d124b84397ca9b))
26+
* **schema-compiler:** join relationship aliases ([ad4e8e3](https://github.com/cube-js/cube/commit/ad4e8e3872307ab77e035709e5208b0191f87f5b))
27+
28+
29+
### Features
30+
31+
* **cubesql:** Basic VALUES support in rewrite engine ([#9041](https://github.com/cube-js/cube/issues/9041)) ([368671f](https://github.com/cube-js/cube/commit/368671fd1b53b2ed5ad8df6af113492982f23c0c))
32+
* **dremio-driver:** Add Dremio Cloud Support ([#8956](https://github.com/cube-js/cube/issues/8956)) ([d2c2fcd](https://github.com/cube-js/cube/commit/d2c2fcdaf8944ea7dd27e73b63c0b151c317022e))
33+
* **tesseract:** Support multiple join paths within single query ([#9047](https://github.com/cube-js/cube/issues/9047)) ([b62446e](https://github.com/cube-js/cube/commit/b62446e3c3893068f8dd8aa32d7204ea06a16f98))
34+
35+
36+
37+
38+
639
## [1.1.9](https://github.com/cube-js/cube/compare/v1.1.8...v1.1.9) (2024-12-08)
740

841

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

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,44 @@ to give the AI context on possible values in a categorical dimension:
181181
- completed
182182
```
183183
184+
### Value search
185+
186+
By default, the AI API has no ability to see the contents of your data (for privacy reasons).
187+
However, this makes it difficult for the AI API to generate correct filters for some queries.
188+
189+
Imagine you have a categorical `order_status` dimension with the possible values "shipped",
190+
"processing", and "completed". Without value search, asking "how many complete orders did
191+
we have today" might get you a query filtering on `order_status = 'Complete'` instead of
192+
the correct `order_status = 'completed'`.
193+
194+
To solve this, the AI API can perform "value searches" where it introspects the values in
195+
selected categorical dimensions before running a query. Value search is opt-in and dimensions
196+
must be enabled for it individually. Currently, the AI API performs value search by running
197+
Cube queries using the `contains` filter operator against one or more chosen dimensions.
198+
The LLM will select dimensions from among those you have based on the question asked and
199+
generate possible values dynamically.
200+
201+
<InfoBox>
202+
When running value search queries, the AI API passes through the security context used
203+
for the AI API request, so security is maintained and only dimensions the end user has
204+
access to are able to be searched.
205+
</InfoBox>
206+
207+
To enable value search on a dimension, set the `searchable` field to true under the `ai`
208+
meta tag, as shown below:
209+
```yaml
210+
- name: order_status
211+
sql: order_status
212+
type: string
213+
meta:
214+
ai:
215+
searchable: true
216+
```
217+
218+
Note that enabling Value Search may lead to slightly longer AI API response times when it
219+
is used but should result in significantly more accurate queries in many situations. Value
220+
Search can only be used on string dimensions.
221+
184222
### Other LLM providers
185223

186224
<InfoBox>

docs/pages/product/workspace/ai-assistant.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ to give the AI context on possible values in a categorical dimension:
9797
- completed
9898
```
9999
100+
### Value search
101+
102+
Value Search can be enabled for AI Assistant in the same way as for the AI API. See the
103+
[AI API's documentation][ref-ai-api-value-search] for details and instructions.
104+
100105
### Other LLM providers
101106
102107
See the [AI API's documentation][ref-ai-api-providers] for information on how to "bring your own" LLM.
@@ -127,3 +132,4 @@ See the [AI API's documentation][ref-ai-api-providers] for information on how to
127132
[ref-playground]: /product/workspace/playground
128133
[ref-catalog-downstream]: /product/workspace/semantic-catalog#connecting-downstream-tools
129134
[ref-ai-api-providers]: /product/apis-integrations/ai-api#other-llm-providers
135+
[ref-ai-api-value-search]: /product/apis-integrations/ai-api#value-search

docs/pages/reference/data-model/joins.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,9 @@ cubes:
409409
Cube automatically detects chasm and fan traps based on the `many_to_one` and `one_to_many` relationships defined in join.
410410
When detected, Cube generates a deduplication query that evaluates all distinct primary keys within the multiplied measure's cube and then joins distinct primary keys to this cube on itself to calculate the aggregation result.
411411
If there's more than one multiplied measure in a query, then such query is generated for every such multiplied measure, and results are joined.
412+
Cube solves for chasm and fan traps during query time.
413+
If there's pre-aggregregation that fits measure multiplication requirements it'd be leveraged to serve such a query.
414+
Such pre-aggregations and queries are always considered non-additive for the purpose of pre-aggregation matching.
412415

413416
Let's consider an example data model:
414417

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.1.9",
2+
"version": "1.1.11",
33
"npmClient": "yarn",
44
"useWorkspaces": true,
55
"packages": [

packages/cubejs-api-gateway/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@
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.1.10](https://github.com/cube-js/cube/compare/v1.1.9...v1.1.10) (2024-12-16)
7+
8+
9+
### Bug Fixes
10+
11+
* **api-gateway:** allow switch sql user when the new user is the same ([#9037](https://github.com/cube-js/cube/issues/9037)) ([a69c28f](https://github.com/cube-js/cube/commit/a69c28f524fa0625b825b98a38e7f5a211a98f74))
12+
* **api-gateway:** make sure DAP works sql pushdown ([#9021](https://github.com/cube-js/cube/issues/9021)) ([23695b2](https://github.com/cube-js/cube/commit/23695b2b5e886b5b7daf8b3f74003bb04e5b2e0b))
13+
* **schema-compiler:** fix DAP with query_rewrite and python config ([#9033](https://github.com/cube-js/cube/issues/9033)) ([849790f](https://github.com/cube-js/cube/commit/849790f965dd0d9fddba11e3d8d124b84397ca9b))
14+
15+
16+
17+
18+
619
## [1.1.9](https://github.com/cube-js/cube/compare/v1.1.8...v1.1.9) (2024-12-08)
720

821
**Note:** Version bump only for package @cubejs-backend/api-gateway

packages/cubejs-api-gateway/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@cubejs-backend/api-gateway",
33
"description": "Cube.js API Gateway",
44
"author": "Cube Dev, Inc.",
5-
"version": "1.1.9",
5+
"version": "1.1.10",
66
"repository": {
77
"type": "git",
88
"url": "https://github.com/cube-js/cube.git",
@@ -27,8 +27,8 @@
2727
"dist/src/*"
2828
],
2929
"dependencies": {
30-
"@cubejs-backend/native": "1.1.9",
31-
"@cubejs-backend/shared": "1.1.8",
30+
"@cubejs-backend/native": "1.1.10",
31+
"@cubejs-backend/shared": "1.1.10",
3232
"@ungap/structured-clone": "^0.3.4",
3333
"body-parser": "^1.19.0",
3434
"chrono-node": "^2.6.2",

packages/cubejs-api-gateway/src/gateway.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,16 +1207,16 @@ class ApiGateway {
12071207
}
12081208

12091209
// First apply cube/view level security policies
1210-
const queryWithRlsFilters = await compilerApi.applyRowLevelSecurity(
1210+
const { query: queryWithRlsFilters, denied } = await compilerApi.applyRowLevelSecurity(
12111211
normalizedQuery,
12121212
evaluatedQuery,
12131213
context
12141214
);
12151215
// Then apply user-supplied queryRewrite
1216-
let rewrittenQuery = await this.queryRewrite(
1216+
let rewrittenQuery = !denied ? await this.queryRewrite(
12171217
queryWithRlsFilters,
12181218
context
1219-
);
1219+
) : queryWithRlsFilters;
12201220

12211221
// applyRowLevelSecurity may add new filters which may contain raw member expressions
12221222
// if that's the case, we should run an extra pass of parsing here to make sure

0 commit comments

Comments
 (0)