Skip to content

Commit be30231

Browse files
committed
update
1 parent 703cc86 commit be30231

File tree

1 file changed

+27
-22
lines changed

1 file changed

+27
-22
lines changed

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

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,28 +1095,33 @@ SELECT 1 AS revenue, cast('2024-01-01' AS timestamp) as time UNION ALL
10951095
{ visitors__created_at_day: '2017-01-10T00:00:00.000Z', visitors__count_rolling: null }
10961096
]));
10971097

1098-
it('rolling count without date range', async () => {
1099-
if (!getEnv('nativeSqlPlanner')) return;
1100-
await runQueryTest({
1101-
measures: [
1102-
'visitors.countRollingThreeMonth'
1103-
],
1104-
timeDimensions: [{
1105-
dimension: 'visitors.created_at',
1106-
granularity: 'month',
1107-
}],
1108-
order: [{
1109-
id: 'visitors.created_at'
1110-
}],
1111-
timezone: 'America/Los_Angeles'
1112-
}, [
1113-
{ visitors__created_at_month: '2016-09-01T00:00:00.000Z', visitors__count_rolling_three_month: '1' },
1114-
{ visitors__created_at_month: '2016-10-01T00:00:00.000Z', visitors__count_rolling_three_month: '1' },
1115-
{ visitors__created_at_month: '2016-11-01T00:00:00.000Z', visitors__count_rolling_three_month: '1' },
1116-
{ visitors__created_at_month: '2016-12-01T00:00:00.000Z', visitors__count_rolling_three_month: null },
1117-
{ visitors__created_at_month: '2017-01-01T00:00:00.000Z', visitors__count_rolling_three_month: '5' },
1118-
]);
1119-
});
1098+
if (!getEnv('nativeSqlPlanner')) {
1099+
it('rolling count without date range', async () => {
1100+
await runQueryTest({
1101+
measures: [
1102+
'visitors.countRollingThreeMonth'
1103+
],
1104+
timeDimensions: [{
1105+
dimension: 'visitors.created_at',
1106+
granularity: 'month',
1107+
}],
1108+
order: [{
1109+
id: 'visitors.created_at'
1110+
}],
1111+
timezone: 'America/Los_Angeles'
1112+
}, [
1113+
{ visitors__created_at_month: '2016-09-01T00:00:00.000Z', visitors__count_rolling_three_month: '1' },
1114+
{ visitors__created_at_month: '2016-10-01T00:00:00.000Z', visitors__count_rolling_three_month: '1' },
1115+
{ visitors__created_at_month: '2016-11-01T00:00:00.000Z', visitors__count_rolling_three_month: '1' },
1116+
{ visitors__created_at_month: '2016-12-01T00:00:00.000Z', visitors__count_rolling_three_month: null },
1117+
{ visitors__created_at_month: '2017-01-01T00:00:00.000Z', visitors__count_rolling_three_month: '5' },
1118+
]);
1119+
});
1120+
} else {
1121+
it.skip('rolling count without date range', () => {
1122+
// Skipping because it works only in Tesseract
1123+
});
1124+
}
11201125

11211126
it('rolling qtd', async () => runQueryTest({
11221127
measures: [

0 commit comments

Comments
 (0)