Skip to content

Commit d6e4faf

Browse files
committed
fix test
1 parent 6f94d07 commit d6e4faf

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/cubejs-schema-compiler/test/integration/postgres/sql-generation.test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2267,6 +2267,10 @@ SELECT 1 AS revenue, cast('2024-01-01' AS timestamp) as time UNION ALL
22672267
await compiler.compile();
22682268

22692269
const query = new PostgresQuery({ joinGraph, cubeEvaluator, compiler }, {
2270+
timeDimensions: [{
2271+
dimension: 'visitors.created_at',
2272+
granularity: 'day'
2273+
}],
22702274
segments: [
22712275
{
22722276
// eslint-disable-next-line no-new-func
@@ -2290,8 +2294,9 @@ SELECT 1 AS revenue, cast('2024-01-01' AS timestamp) as time UNION ALL
22902294

22912295
const res = await testWithPreAggregation(preAggregationsDescription, query);
22922296
expect(res).toEqual(
2293-
// Empty result set, only segments in query
2294-
[{}]
2297+
[{
2298+
visitors__created_at_day: '2017-01-02T00:00:00.000Z',
2299+
}]
22952300
);
22962301
});
22972302

0 commit comments

Comments
 (0)