Skip to content

Commit 2377278

Browse files
committed
mark some tests as skipped for tesseract
1 parent 9255f51 commit 2377278

File tree

2 files changed

+143
-119
lines changed

2 files changed

+143
-119
lines changed

packages/cubejs-schema-compiler/test/integration/postgres/multi-fact-join.test.ts

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -112,23 +112,29 @@ cube(\`city\`, {
112112
);
113113
}
114114

115-
it('two regular sub-queries', async () => runQueryTest({
116-
measures: ['orders.amount', 'shipments.count'],
117-
dimensions: [
118-
'city.name'
119-
],
120-
order: [{ id: 'city.name' }]
121-
}, [{
122-
city__name: 'New York City',
123-
orders__amount: '9',
124-
shipments__count: '3',
125-
}, {
126-
city__name: 'San Francisco',
127-
orders__amount: '6',
128-
shipments__count: '1',
129-
}, {
130-
city__name: null,
131-
orders__amount: '6',
132-
shipments__count: '1',
133-
}]));
115+
if (getEnv('nativeSqlPlanner')) {
116+
it.skip('FIXME(tesseract): two regular sub-queries', () => {
117+
// TODO: Fix in tesseract
118+
});
119+
} else {
120+
it('two regular sub-queries', async () => runQueryTest({
121+
measures: ['orders.amount', 'shipments.count'],
122+
dimensions: [
123+
'city.name'
124+
],
125+
order: [{ id: 'city.name' }]
126+
}, [{
127+
city__name: 'New York City',
128+
orders__amount: '9',
129+
shipments__count: '3',
130+
}, {
131+
city__name: 'San Francisco',
132+
orders__amount: '6',
133+
shipments__count: '1',
134+
}, {
135+
city__name: null,
136+
orders__amount: '6',
137+
shipments__count: '1',
138+
}]));
139+
}
134140
});

packages/cubejs-schema-compiler/test/integration/postgres/pre-aggregations.test.ts

Lines changed: 118 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -2257,129 +2257,147 @@ describe('PreAggregations', () => {
22572257
});
22582258
});
22592259

2260-
it('rollup join', async () => {
2261-
await compiler.compile();
2262-
2263-
const query = new PostgresQuery({ joinGraph, cubeEvaluator, compiler }, {
2264-
measures: [
2265-
'visitor_checkins.count',
2266-
],
2267-
dimensions: ['visitors.source'],
2268-
preAggregationsSchema: '',
2269-
order: [{
2270-
id: 'visitors.source',
2271-
}],
2272-
timezone: 'UTC',
2260+
if (getEnv('nativeSqlPlanner')) {
2261+
it.skip('FIXME(tesseract): rollup join', () => {
2262+
// TODO: Fix in tesseract
22732263
});
2264+
} else {
2265+
it('rollup join', async () => {
2266+
await compiler.compile();
22742267

2275-
const queryAndParams = query.buildSqlAndParams();
2276-
console.log(queryAndParams);
2277-
const preAggregationsDescription: any = query.preAggregations?.preAggregationsDescription();
2278-
console.log(preAggregationsDescription);
2268+
const query = new PostgresQuery({ joinGraph, cubeEvaluator, compiler }, {
2269+
measures: [
2270+
'visitor_checkins.count',
2271+
],
2272+
dimensions: ['visitors.source'],
2273+
preAggregationsSchema: '',
2274+
order: [{
2275+
id: 'visitors.source',
2276+
}],
2277+
timezone: 'UTC',
2278+
});
22792279

2280-
console.log(query.preAggregations?.rollupMatchResultDescriptions());
2280+
const queryAndParams = query.buildSqlAndParams();
2281+
console.log(queryAndParams);
2282+
const preAggregationsDescription: any = query.preAggregations?.preAggregationsDescription();
2283+
console.log(preAggregationsDescription);
22812284

2282-
const queries = dbRunner.tempTablePreAggregations(preAggregationsDescription);
2285+
console.log(query.preAggregations?.rollupMatchResultDescriptions());
22832286

2284-
console.log(JSON.stringify(queries.concat(queryAndParams)));
2287+
const queries = dbRunner.tempTablePreAggregations(preAggregationsDescription);
22852288

2286-
return dbRunner.evaluateQueryWithPreAggregations(query).then(res => {
2287-
console.log(JSON.stringify(res));
2288-
expect(res).toEqual(
2289-
[
2290-
{ visitors__source: 'google', vc__count: '1' },
2291-
{ visitors__source: 'some', vc__count: '5' },
2292-
{ visitors__source: null, vc__count: '0' },
2293-
],
2294-
);
2295-
});
2296-
});
2289+
console.log(JSON.stringify(queries.concat(queryAndParams)));
22972290

2298-
it('rollup join existing joins', async () => {
2299-
await compiler.compile();
2291+
return dbRunner.evaluateQueryWithPreAggregations(query).then(res => {
2292+
console.log(JSON.stringify(res));
2293+
expect(res).toEqual(
2294+
[
2295+
{ visitors__source: 'google', vc__count: '1' },
2296+
{ visitors__source: 'some', vc__count: '5' },
2297+
{ visitors__source: null, vc__count: '0' },
2298+
],
2299+
);
2300+
});
2301+
});
2302+
}
23002303

2301-
const query = new PostgresQuery({ joinGraph, cubeEvaluator, compiler }, {
2302-
measures: [
2303-
'visitor_checkins.count',
2304-
],
2305-
dimensions: ['visitors.source', 'cards.visitorId'],
2306-
preAggregationsSchema: '',
2307-
order: [{
2308-
id: 'visitors.source',
2309-
}, {
2310-
id: 'cards.visitorId',
2311-
}],
2312-
timezone: 'UTC',
2304+
if (getEnv('nativeSqlPlanner')) {
2305+
it.skip('FIXME(tesseract): rollup join existing joins', () => {
2306+
// TODO: Fix in tesseract
23132307
});
2308+
} else {
2309+
it('rollup join existing joins', async () => {
2310+
await compiler.compile();
23142311

2315-
const queryAndParams = query.buildSqlAndParams();
2316-
console.log(queryAndParams);
2317-
const preAggregationsDescription = query.preAggregations?.preAggregationsDescription();
2318-
console.log(preAggregationsDescription);
2312+
const query = new PostgresQuery({ joinGraph, cubeEvaluator, compiler }, {
2313+
measures: [
2314+
'visitor_checkins.count',
2315+
],
2316+
dimensions: ['visitors.source', 'cards.visitorId'],
2317+
preAggregationsSchema: '',
2318+
order: [{
2319+
id: 'visitors.source',
2320+
}, {
2321+
id: 'cards.visitorId',
2322+
}],
2323+
timezone: 'UTC',
2324+
});
23192325

2320-
console.log(query.preAggregations?.rollupMatchResultDescriptions());
2326+
const queryAndParams = query.buildSqlAndParams();
2327+
console.log(queryAndParams);
2328+
const preAggregationsDescription = query.preAggregations?.preAggregationsDescription();
2329+
console.log(preAggregationsDescription);
23212330

2322-
const queries = dbRunner.tempTablePreAggregations(preAggregationsDescription);
2331+
console.log(query.preAggregations?.rollupMatchResultDescriptions());
23232332

2324-
console.log(JSON.stringify(queries.concat(queryAndParams)));
2333+
const queries = dbRunner.tempTablePreAggregations(preAggregationsDescription);
23252334

2326-
return dbRunner.evaluateQueryWithPreAggregations(query).then(res => {
2327-
console.log(JSON.stringify(res));
2328-
expect(res).toEqual(
2329-
[
2330-
{ visitors__source: 'google', cards__visitor_id: 3, vc__count: '1' },
2331-
{ visitors__source: 'some', cards__visitor_id: 1, vc__count: '3' },
2332-
{ visitors__source: 'some', cards__visitor_id: null, vc__count: '2' },
2333-
{ visitors__source: null, cards__visitor_id: null, vc__count: '0' },
2334-
],
2335-
);
2336-
});
2337-
});
2335+
console.log(JSON.stringify(queries.concat(queryAndParams)));
23382336

2339-
it('rollup join partitioned', async () => {
2340-
await compiler.compile();
2337+
return dbRunner.evaluateQueryWithPreAggregations(query).then(res => {
2338+
console.log(JSON.stringify(res));
2339+
expect(res).toEqual(
2340+
[
2341+
{ visitors__source: 'google', cards__visitor_id: 3, vc__count: '1' },
2342+
{ visitors__source: 'some', cards__visitor_id: 1, vc__count: '3' },
2343+
{ visitors__source: 'some', cards__visitor_id: null, vc__count: '2' },
2344+
{ visitors__source: null, cards__visitor_id: null, vc__count: '0' },
2345+
],
2346+
);
2347+
});
2348+
});
2349+
}
23412350

2342-
const query = new PostgresQuery({ joinGraph, cubeEvaluator, compiler }, {
2343-
measures: [
2344-
'visitor_checkins.count',
2345-
],
2346-
dimensions: ['visitors.source'],
2347-
timezone: 'America/Los_Angeles',
2348-
preAggregationsSchema: '',
2349-
timeDimensions: [{
2350-
dimension: 'visitors.createdAt',
2351-
granularity: 'hour',
2352-
dateRange: ['2017-01-03', '2017-01-04']
2353-
}],
2354-
order: [{
2355-
id: 'visitors.createdAt'
2356-
}],
2351+
if (getEnv('nativeSqlPlanner')) {
2352+
it.skip('FIXME(tesseract): rollup join partitioned', () => {
2353+
// TODO: Fix in tesseract
23572354
});
2355+
} else {
2356+
it('rollup join partitioned', async () => {
2357+
await compiler.compile();
23582358

2359-
const queryAndParams = query.buildSqlAndParams();
2360-
console.log(queryAndParams);
2361-
const preAggregationsDescription = query.preAggregations?.preAggregationsDescription();
2362-
console.log(preAggregationsDescription);
2359+
const query = new PostgresQuery({ joinGraph, cubeEvaluator, compiler }, {
2360+
measures: [
2361+
'visitor_checkins.count',
2362+
],
2363+
dimensions: ['visitors.source'],
2364+
timezone: 'America/Los_Angeles',
2365+
preAggregationsSchema: '',
2366+
timeDimensions: [{
2367+
dimension: 'visitors.createdAt',
2368+
granularity: 'hour',
2369+
dateRange: ['2017-01-03', '2017-01-04']
2370+
}],
2371+
order: [{
2372+
id: 'visitors.createdAt'
2373+
}],
2374+
});
23632375

2364-
console.log(query.preAggregations?.rollupMatchResultDescriptions());
2376+
const queryAndParams = query.buildSqlAndParams();
2377+
console.log(queryAndParams);
2378+
const preAggregationsDescription = query.preAggregations?.preAggregationsDescription();
2379+
console.log(preAggregationsDescription);
23652380

2366-
const queries = dbRunner.tempTablePreAggregations(preAggregationsDescription);
2381+
console.log(query.preAggregations?.rollupMatchResultDescriptions());
23672382

2368-
console.log(JSON.stringify(queries.concat(queryAndParams)));
2383+
const queries = dbRunner.tempTablePreAggregations(preAggregationsDescription);
23692384

2370-
return dbRunner.evaluateQueryWithPreAggregations(query).then(res => {
2371-
console.log(JSON.stringify(res));
2372-
expect(res).toEqual(
2373-
[
2374-
{
2375-
visitors__source: 'some',
2376-
visitors__created_at_hour: '2017-01-04T16:00:00.000Z',
2377-
vc__count: '2'
2378-
}
2379-
],
2380-
);
2385+
console.log(JSON.stringify(queries.concat(queryAndParams)));
2386+
2387+
return dbRunner.evaluateQueryWithPreAggregations(query).then(res => {
2388+
console.log(JSON.stringify(res));
2389+
expect(res).toEqual(
2390+
[
2391+
{
2392+
visitors__source: 'some',
2393+
visitors__created_at_hour: '2017-01-04T16:00:00.000Z',
2394+
vc__count: '2'
2395+
}
2396+
],
2397+
);
2398+
});
23812399
});
2382-
});
2400+
}
23832401

23842402
it('partitioned without time', async () => {
23852403
await compiler.compile();

0 commit comments

Comments
 (0)