|
| 1 | +/* eslint-disable quote-props */ |
1 | 2 | /* globals describe, before, after, it */
|
2 | 3 | const CompileError = require('../compiler/CompileError');
|
3 | 4 | const PrepareCompiler = require('./PrepareCompiler');
|
@@ -168,10 +169,10 @@ describe('ClickHouse DataSchemaCompiler', function test() {
|
168 | 169 | return dbRunner.testQuery(query.buildSqlAndParams()).then(res => {
|
169 | 170 | res.should.be.deepEqual(
|
170 | 171 | [
|
171 |
| - { "visitors.created_at_date": "2017-01-02T00:00:00.000", "visitors.visitor_count": "1" }, |
172 |
| - { "visitors.created_at_date": "2017-01-04T00:00:00.000", "visitors.visitor_count": "1" }, |
173 |
| - { "visitors.created_at_date": "2017-01-05T00:00:00.000", "visitors.visitor_count": "1" }, |
174 |
| - { "visitors.created_at_date": "2017-01-06T00:00:00.000", "visitors.visitor_count": "2" } |
| 172 | + { "visitors__created_at_date": "2017-01-02T00:00:00.000", "visitors__visitor_count": "1" }, |
| 173 | + { "visitors__created_at_date": "2017-01-04T00:00:00.000", "visitors__visitor_count": "1" }, |
| 174 | + { "visitors__created_at_date": "2017-01-05T00:00:00.000", "visitors__visitor_count": "1" }, |
| 175 | + { "visitors__created_at_date": "2017-01-06T00:00:00.000", "visitors__visitor_count": "2" } |
175 | 176 | ]
|
176 | 177 | );
|
177 | 178 | });
|
@@ -230,8 +231,8 @@ describe('ClickHouse DataSchemaCompiler', function test() {
|
230 | 231 | return dbRunner.testQuery(query.buildSqlAndParams()).then(res => {
|
231 | 232 | res.should.be.deepEqual(
|
232 | 233 | [
|
233 |
| - { "visitors.status": "Approved", "visitors.visitor_count": "2" }, |
234 |
| - { "visitors.status": "Canceled", "visitors.visitor_count": "4" } |
| 234 | + { "visitors__status": "Approved", "visitors__visitor_count": "2" }, |
| 235 | + { "visitors__status": "Canceled", "visitors__visitor_count": "4" } |
235 | 236 | ]
|
236 | 237 | );
|
237 | 238 | });
|
@@ -264,21 +265,21 @@ describe('ClickHouse DataSchemaCompiler', function test() {
|
264 | 265 | })
|
265 | 266 | `);
|
266 | 267 | const responses = [
|
267 |
| - [{ 'visitors.created_at': '2017-01-02T16:00:00.000' }], |
| 268 | + [{ "visitors__created_at": '2017-01-02T16:00:00.000' }], |
268 | 269 | [
|
269 |
| - { 'visitors.created_at': '2016-09-06T16:00:00.000' }, |
270 |
| - { 'visitors.created_at': '2017-01-04T16:00:00.000' }, |
271 |
| - { 'visitors.created_at': '2017-01-05T16:00:00.000' }, |
272 |
| - { 'visitors.created_at': '2017-01-06T16:00:00.000' } |
| 270 | + { "visitors__created_at": '2016-09-06T16:00:00.000' }, |
| 271 | + { "visitors__created_at": '2017-01-04T16:00:00.000' }, |
| 272 | + { "visitors__created_at": '2017-01-05T16:00:00.000' }, |
| 273 | + { "visitors__created_at": '2017-01-06T16:00:00.000' } |
273 | 274 | ],
|
274 |
| - [{ 'visitors.created_at': '2017-01-06T16:00:00.000' }], |
| 275 | + [{ "visitors__created_at": '2017-01-06T16:00:00.000' }], |
275 | 276 | [
|
276 |
| - { 'visitors.created_at': '2016-09-06T16:00:00.000' }, |
277 |
| - { 'visitors.created_at': '2017-01-02T16:00:00.000' }, |
278 |
| - { 'visitors.created_at': '2017-01-04T16:00:00.000' }, |
279 |
| - { 'visitors.created_at': '2017-01-05T16:00:00.000' } |
| 277 | + { "visitors__created_at": '2016-09-06T16:00:00.000' }, |
| 278 | + { "visitors__created_at": '2017-01-02T16:00:00.000' }, |
| 279 | + { "visitors__created_at": '2017-01-04T16:00:00.000' }, |
| 280 | + { "visitors__created_at": '2017-01-05T16:00:00.000' } |
280 | 281 | ],
|
281 |
| - [{ 'visitors.created_at': '2017-01-06T16:00:00.000' }] |
| 282 | + [{ "visitors__created_at": '2017-01-06T16:00:00.000' }] |
282 | 283 | ];
|
283 | 284 | ['in_date_range', 'not_in_date_range', 'on_the_date', 'before_date', 'after_date'].map((operator, index) => {
|
284 | 285 | const filterValues = index < 2 ? ['2017-01-01', '2017-01-03'] : ['2017-01-06', '2017-01-06'];
|
|
0 commit comments