Skip to content

Commit bea009e

Browse files
committed
uncomment test
1 parent 813b54f commit bea009e

File tree

1 file changed

+43
-26
lines changed

1 file changed

+43
-26
lines changed

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

Lines changed: 43 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5345,31 +5345,48 @@ cubes:
53455345
});
53465346
}
53475347

5348-
it('querying cube with transitive joins with a few joins to same cube', async () => {
5349-
// TODO: This is not supported atm, but it's a good case, so keeping this test
5350-
// for the future implementation
5351-
5352-
// await compiler.compile();
5353-
//
5354-
// const query = new PostgresQuery({ joinGraph, cubeEvaluator, compiler }, {
5355-
// measures: [],
5356-
// dimensions: [
5357-
// 'alpha_facts.reporting_date',
5358-
// 'delta_bridge.b_name',
5359-
// 'alpha_facts.channel'
5360-
// ],
5361-
// order: [{
5362-
// id: 'alpha_facts.reporting_date'
5363-
// }],
5364-
// timezone: 'America/Los_Angeles'
5365-
// });
5366-
//
5367-
// const res = await dbRunner.testQuery(query.buildSqlAndParams());
5368-
// console.log(JSON.stringify(res));
5369-
//
5370-
// expect(res).toEqual([
5371-
// // Fill
5372-
// ]);
5373-
});
5348+
if (!getEnv('nativeSqlPlanner')) {
5349+
it('querying cube with transitive joins with a few joins to the same cube', async () => {
5350+
await compiler.compile();
5351+
5352+
const query = new PostgresQuery({ joinGraph, cubeEvaluator, compiler }, {
5353+
measures: [],
5354+
dimensions: [
5355+
'alpha_facts.reporting_date',
5356+
'delta_bridge.b_name',
5357+
'alpha_facts.channel'
5358+
],
5359+
order: [{
5360+
id: 'alpha_facts.reporting_date'
5361+
}],
5362+
timezone: 'America/Los_Angeles'
5363+
});
5364+
5365+
const res = await dbRunner.testQuery(query.buildSqlAndParams());
5366+
console.log(JSON.stringify(res));
5367+
5368+
expect(res).toEqual([
5369+
{
5370+
alpha_facts__channel: 'Organic',
5371+
alpha_facts__reporting_date: '2023-01-01T00:00:00.000Z',
5372+
delta_bridge__b_name: 'Beta1',
5373+
},
5374+
{
5375+
alpha_facts__channel: 'Paid',
5376+
alpha_facts__reporting_date: '2023-01-01T00:00:00.000Z',
5377+
delta_bridge__b_name: 'Beta1',
5378+
},
5379+
{
5380+
alpha_facts__channel: 'Referral',
5381+
alpha_facts__reporting_date: '2023-01-02T00:00:00.000Z',
5382+
delta_bridge__b_name: 'Beta2',
5383+
},
5384+
]);
5385+
});
5386+
} else {
5387+
it.skip('FIXME(tesseract): querying cube with transitive joins with a few joins to the same cube', async () => {
5388+
// FIXME should be implemented in Tesseract
5389+
});
5390+
}
53745391
});
53755392
});

0 commit comments

Comments
 (0)