Skip to content

Commit 1445f68

Browse files
committed
fix test
1 parent 6687f20 commit 1445f68

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
@@ -2260,6 +2260,10 @@ SELECT 1 AS revenue, cast('2024-01-01' AS timestamp) as time UNION ALL
22602260
await compiler.compile();
22612261

22622262
const query = new PostgresQuery({ joinGraph, cubeEvaluator, compiler }, {
2263+
timeDimensions: [{
2264+
dimension: 'visitors.created_at',
2265+
granularity: 'day'
2266+
}],
22632267
segments: [
22642268
{
22652269
// eslint-disable-next-line no-new-func
@@ -2283,8 +2287,9 @@ SELECT 1 AS revenue, cast('2024-01-01' AS timestamp) as time UNION ALL
22832287

22842288
const res = await testWithPreAggregation(preAggregationsDescription, query);
22852289
expect(res).toEqual(
2286-
// Empty result set, only segments in query
2287-
[{}]
2290+
[{
2291+
visitors__created_at_day: '2017-01-02T00:00:00.000Z',
2292+
}]
22882293
);
22892294
});
22902295

0 commit comments

Comments
 (0)