Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,065 changes: 539 additions & 526 deletions examples/full-jaffle-shop-demo/dbt/models/orders.yml

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert this file :) or just use it for testing

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"@octokit/request": "8.4.1",
"@octokit/rest": "20.1.1",
"@openrouter/ai-sdk-provider": "1.5.4",
"@polyglot-sql/sdk": "0.2.2",
"@rudderstack/rudder-sdk-node": "2.1.1",
"@sentry/core": "9.31.0",
"@sentry/node": "9.46.0",
Expand Down
24 changes: 24 additions & 0 deletions packages/backend/src/ee/preAggregates/matcher.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,30 @@ describe('findMatch', () => {
expect(result.hit).toBe(true);
});

it('allows pre-aggregate match when base table has sqlWhere (transpiled at query time)', () => {
const explore = {
...baseExplore(),
preAggregates: [
{
name: 'orders_summary',
dimensions: ['status'],
metrics: ['order_count'],
},
],
};
explore.tables.orders.sqlWhere = "status != 'deleted'";

const result = preAggregateUtils.findMatch(
makeMetricQuery({
dimensions: ['orders_status'],
metrics: ['orders_order_count'],
}),
explore,
);

expect(result.hit).toBe(true);
});

it('returns custom_dimension_present when custom dimensions exist', () => {
const explore = {
...baseExplore(),
Expand Down
Loading
Loading