Skip to content

Commit f1861fc

Browse files
committed
lint
1 parent 90875b9 commit f1861fc

File tree

1 file changed

+137
-137
lines changed

1 file changed

+137
-137
lines changed

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

Lines changed: 137 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -4447,177 +4447,177 @@ SELECT 1 AS revenue, cast('2024-01-01' AS timestamp) as time UNION ALL
44474447
));
44484448

44494449
if (getEnv('nativeSqlPlanner')) {
4450-
it('multi stage sum with group by time dim with granularity', async () => runQueryTest(
4451-
{
4452-
measures: ['visitors.visitors_revenue_per_year', 'visitors.revenue'],
4453-
dimensions: ['visitors.source'],
4454-
timeDimensions: [{
4455-
dimension: 'visitors.created_at',
4456-
granularity: 'year',
4457-
dateRange: ['2016-01-01', '2017-01-30']
4458-
}],
4459-
timezone: 'America/Los_Angeles',
4460-
order: [{
4461-
id: 'visitors.source'
4462-
}, {
4463-
id: 'visitors.created_at'
4464-
}],
4465-
},
4466-
4467-
[{
4468-
visitors__source: 'google',
4469-
visitors__created_at_year: '2017-01-01T00:00:00.000Z',
4470-
visitors__visitors_revenue_per_year: '1500',
4471-
visitors__revenue: '300'
4472-
},
4473-
{
4474-
visitors__source: 'some',
4475-
visitors__created_at_year: '2017-01-01T00:00:00.000Z',
4476-
visitors__visitors_revenue_per_year: '1500',
4477-
visitors__revenue: '300'
4478-
},
4479-
{
4480-
visitors__source: null,
4481-
visitors__created_at_year: '2016-01-01T00:00:00.000Z',
4482-
visitors__visitors_revenue_per_year: '500',
4483-
visitors__revenue: '500'
4484-
},
4485-
{
4486-
visitors__source: null,
4487-
visitors__created_at_year: '2017-01-01T00:00:00.000Z',
4488-
visitors__visitors_revenue_per_year: '1500',
4489-
visitors__revenue: '900'
4490-
}]
4491-
));
4492-
} else {
4493-
it.skip('multi stage sum with group by time dim with granularity', async () => {
4494-
// Works only in Tesseract
4495-
});
4496-
}
4497-
4498-
if (getEnv('nativeSqlPlanner')) {
4499-
it('multi stage sum multiple time dims group by time dim with granularity', async () => runQueryTest(
4500-
{
4501-
measures: ['visitors.visitors_revenue_per_year', 'visitors.revenue'],
4502-
dimensions: ['visitors.source'],
4503-
timeDimensions: [{
4504-
dimension: 'visitors.created_at',
4505-
granularity: 'year',
4506-
dateRange: ['2014-01-01', '2018-01-30']
4507-
},
4450+
it('multi stage sum with group by time dim with granularity', async () => runQueryTest(
45084451
{
4509-
dimension: 'visitors.created_at',
4510-
granularity: 'day',
4511-
dateRange: ['2014-01-01', '2018-01-30']
4512-
}],
4513-
timezone: 'America/Los_Angeles',
4514-
order: [{
4515-
id: 'visitors.source'
4516-
}, {
4517-
id: 'visitors.created_at'
4518-
}],
4519-
},
4452+
measures: ['visitors.visitors_revenue_per_year', 'visitors.revenue'],
4453+
dimensions: ['visitors.source'],
4454+
timeDimensions: [{
4455+
dimension: 'visitors.created_at',
4456+
granularity: 'year',
4457+
dateRange: ['2016-01-01', '2017-01-30']
4458+
}],
4459+
timezone: 'America/Los_Angeles',
4460+
order: [{
4461+
id: 'visitors.source'
4462+
}, {
4463+
id: 'visitors.created_at'
4464+
}],
4465+
},
45204466

4521-
[
4522-
{
4467+
[{
45234468
visitors__source: 'google',
45244469
visitors__created_at_year: '2017-01-01T00:00:00.000Z',
4525-
visitors__created_at_day: '2017-01-05T00:00:00.000Z',
45264470
visitors__visitors_revenue_per_year: '1500',
45274471
visitors__revenue: '300'
45284472
},
45294473
{
45304474
visitors__source: 'some',
45314475
visitors__created_at_year: '2017-01-01T00:00:00.000Z',
4532-
visitors__created_at_day: '2017-01-02T00:00:00.000Z',
45334476
visitors__visitors_revenue_per_year: '1500',
4534-
visitors__revenue: '100'
4535-
},
4536-
{
4537-
visitors__source: 'some',
4538-
visitors__created_at_year: '2017-01-01T00:00:00.000Z',
4539-
visitors__created_at_day: '2017-01-04T00:00:00.000Z',
4540-
visitors__visitors_revenue_per_year: '1500',
4541-
visitors__revenue: '200'
4477+
visitors__revenue: '300'
45424478
},
45434479
{
45444480
visitors__source: null,
45454481
visitors__created_at_year: '2016-01-01T00:00:00.000Z',
4546-
visitors__created_at_day: '2016-09-06T00:00:00.000Z',
45474482
visitors__visitors_revenue_per_year: '500',
45484483
visitors__revenue: '500'
45494484
},
45504485
{
45514486
visitors__source: null,
45524487
visitors__created_at_year: '2017-01-01T00:00:00.000Z',
4553-
visitors__created_at_day: '2017-01-06T00:00:00.000Z',
45544488
visitors__visitors_revenue_per_year: '1500',
45554489
visitors__revenue: '900'
4556-
}
4557-
]
4558-
));
4490+
}]
4491+
));
45594492
} else {
4560-
it.skip('multi stage sum multiple time dims group by time dim with granularity', async () => {
4493+
it.skip('multi stage sum with group by time dim with granularity', async () => {
45614494
// Works only in Tesseract
45624495
});
45634496
}
45644497

45654498
if (getEnv('nativeSqlPlanner')) {
4566-
it('multi stage sum multiple time dims reduce by time dim with granularity', async () => runQueryTest(
4567-
{
4568-
measures: ['visitors.visitors_revenue_reduce_day', 'visitors.revenue'],
4569-
timeDimensions: [{
4570-
dimension: 'visitors.created_at',
4571-
granularity: 'year',
4572-
dateRange: ['2014-01-01', '2018-01-30']
4573-
},
4499+
it('multi stage sum multiple time dims group by time dim with granularity', async () => runQueryTest(
45744500
{
4575-
dimension: 'visitors.created_at',
4576-
granularity: 'day',
4577-
dateRange: ['2014-01-01', '2018-01-30']
4578-
}],
4579-
timezone: 'America/Los_Angeles',
4580-
order: [{
4581-
id: 'visitors.source'
4582-
}, {
4583-
id: 'visitors.created_at'
4584-
}],
4585-
},
4501+
measures: ['visitors.visitors_revenue_per_year', 'visitors.revenue'],
4502+
dimensions: ['visitors.source'],
4503+
timeDimensions: [{
4504+
dimension: 'visitors.created_at',
4505+
granularity: 'year',
4506+
dateRange: ['2014-01-01', '2018-01-30']
4507+
},
4508+
{
4509+
dimension: 'visitors.created_at',
4510+
granularity: 'day',
4511+
dateRange: ['2014-01-01', '2018-01-30']
4512+
}],
4513+
timezone: 'America/Los_Angeles',
4514+
order: [{
4515+
id: 'visitors.source'
4516+
}, {
4517+
id: 'visitors.created_at'
4518+
}],
4519+
},
45864520

4587-
[
4521+
[
4522+
{
4523+
visitors__source: 'google',
4524+
visitors__created_at_year: '2017-01-01T00:00:00.000Z',
4525+
visitors__created_at_day: '2017-01-05T00:00:00.000Z',
4526+
visitors__visitors_revenue_per_year: '1500',
4527+
visitors__revenue: '300'
4528+
},
4529+
{
4530+
visitors__source: 'some',
4531+
visitors__created_at_year: '2017-01-01T00:00:00.000Z',
4532+
visitors__created_at_day: '2017-01-02T00:00:00.000Z',
4533+
visitors__visitors_revenue_per_year: '1500',
4534+
visitors__revenue: '100'
4535+
},
4536+
{
4537+
visitors__source: 'some',
4538+
visitors__created_at_year: '2017-01-01T00:00:00.000Z',
4539+
visitors__created_at_day: '2017-01-04T00:00:00.000Z',
4540+
visitors__visitors_revenue_per_year: '1500',
4541+
visitors__revenue: '200'
4542+
},
4543+
{
4544+
visitors__source: null,
4545+
visitors__created_at_year: '2016-01-01T00:00:00.000Z',
4546+
visitors__created_at_day: '2016-09-06T00:00:00.000Z',
4547+
visitors__visitors_revenue_per_year: '500',
4548+
visitors__revenue: '500'
4549+
},
4550+
{
4551+
visitors__source: null,
4552+
visitors__created_at_year: '2017-01-01T00:00:00.000Z',
4553+
visitors__created_at_day: '2017-01-06T00:00:00.000Z',
4554+
visitors__visitors_revenue_per_year: '1500',
4555+
visitors__revenue: '900'
4556+
}
4557+
]
4558+
));
4559+
} else {
4560+
it.skip('multi stage sum multiple time dims group by time dim with granularity', async () => {
4561+
// Works only in Tesseract
4562+
});
4563+
}
45884564

4565+
if (getEnv('nativeSqlPlanner')) {
4566+
it('multi stage sum multiple time dims reduce by time dim with granularity', async () => runQueryTest(
45894567
{
4590-
visitors__created_at_year: '2016-01-01T00:00:00.000Z',
4591-
visitors__created_at_day: '2016-09-06T00:00:00.000Z',
4592-
visitors__visitors_revenue_reduce_day: '500',
4593-
visitors__revenue: '500'
4594-
},
4595-
{
4596-
visitors__created_at_year: '2017-01-01T00:00:00.000Z',
4597-
visitors__created_at_day: '2017-01-02T00:00:00.000Z',
4598-
visitors__visitors_revenue_reduce_day: '1500',
4599-
visitors__revenue: '100'
4600-
},
4601-
{
4602-
visitors__created_at_year: '2017-01-01T00:00:00.000Z',
4603-
visitors__created_at_day: '2017-01-04T00:00:00.000Z',
4604-
visitors__visitors_revenue_reduce_day: '1500',
4605-
visitors__revenue: '200'
4606-
},
4607-
{
4608-
visitors__created_at_year: '2017-01-01T00:00:00.000Z',
4609-
visitors__created_at_day: '2017-01-05T00:00:00.000Z',
4610-
visitors__visitors_revenue_reduce_day: '1500',
4611-
visitors__revenue: '300'
4568+
measures: ['visitors.visitors_revenue_reduce_day', 'visitors.revenue'],
4569+
timeDimensions: [{
4570+
dimension: 'visitors.created_at',
4571+
granularity: 'year',
4572+
dateRange: ['2014-01-01', '2018-01-30']
4573+
},
4574+
{
4575+
dimension: 'visitors.created_at',
4576+
granularity: 'day',
4577+
dateRange: ['2014-01-01', '2018-01-30']
4578+
}],
4579+
timezone: 'America/Los_Angeles',
4580+
order: [{
4581+
id: 'visitors.source'
4582+
}, {
4583+
id: 'visitors.created_at'
4584+
}],
46124585
},
4613-
{
4614-
visitors__created_at_year: '2017-01-01T00:00:00.000Z',
4615-
visitors__created_at_day: '2017-01-06T00:00:00.000Z',
4616-
visitors__visitors_revenue_reduce_day: '1500',
4617-
visitors__revenue: '900'
4618-
}
4619-
]
4620-
));
4586+
4587+
[
4588+
4589+
{
4590+
visitors__created_at_year: '2016-01-01T00:00:00.000Z',
4591+
visitors__created_at_day: '2016-09-06T00:00:00.000Z',
4592+
visitors__visitors_revenue_reduce_day: '500',
4593+
visitors__revenue: '500'
4594+
},
4595+
{
4596+
visitors__created_at_year: '2017-01-01T00:00:00.000Z',
4597+
visitors__created_at_day: '2017-01-02T00:00:00.000Z',
4598+
visitors__visitors_revenue_reduce_day: '1500',
4599+
visitors__revenue: '100'
4600+
},
4601+
{
4602+
visitors__created_at_year: '2017-01-01T00:00:00.000Z',
4603+
visitors__created_at_day: '2017-01-04T00:00:00.000Z',
4604+
visitors__visitors_revenue_reduce_day: '1500',
4605+
visitors__revenue: '200'
4606+
},
4607+
{
4608+
visitors__created_at_year: '2017-01-01T00:00:00.000Z',
4609+
visitors__created_at_day: '2017-01-05T00:00:00.000Z',
4610+
visitors__visitors_revenue_reduce_day: '1500',
4611+
visitors__revenue: '300'
4612+
},
4613+
{
4614+
visitors__created_at_year: '2017-01-01T00:00:00.000Z',
4615+
visitors__created_at_day: '2017-01-06T00:00:00.000Z',
4616+
visitors__visitors_revenue_reduce_day: '1500',
4617+
visitors__revenue: '900'
4618+
}
4619+
]
4620+
));
46214621
} else {
46224622
it.skip('multi stage sum multiple time dims reduce by time dim with granularity', async () => {
46234623
// Works only in Tesseract

0 commit comments

Comments
 (0)