@@ -366,12 +366,12 @@ describe('MSSqlUngrouped', () => {
366366 ungrouped : true ,
367367 allowUngroupedWithoutPrimaryKey : true ,
368368 } , [
369+ { visitor_checkins__created_at_day : new Date ( '2017-01-02T00:00:00.000Z' ) , visitor_checkins__google_sourced_checkins : null } ,
369370 { visitor_checkins__created_at_day : new Date ( '2017-01-03T00:00:00.000Z' ) , visitor_checkins__google_sourced_checkins : null } ,
370371 { visitor_checkins__created_at_day : new Date ( '2017-01-04T00:00:00.000Z' ) , visitor_checkins__google_sourced_checkins : null } ,
371- { visitor_checkins__created_at_day : new Date ( '2017-01-05T00:00:00.000Z' ) , visitor_checkins__google_sourced_checkins : null } ,
372- { visitor_checkins__created_at_day : new Date ( '2017-01-05T00:00:00.000Z' ) , visitor_checkins__google_sourced_checkins : null } ,
373- { visitor_checkins__created_at_day : new Date ( '2017-01-05T00:00:00.000Z' ) , visitor_checkins__google_sourced_checkins : null } ,
374- { visitor_checkins__created_at_day : new Date ( '2017-01-06T00:00:00.000Z' ) , visitor_checkins__google_sourced_checkins : 1 } ,
372+ { visitor_checkins__created_at_day : new Date ( '2017-01-04T00:00:00.000Z' ) , visitor_checkins__google_sourced_checkins : null } ,
373+ { visitor_checkins__created_at_day : new Date ( '2017-01-04T00:00:00.000Z' ) , visitor_checkins__google_sourced_checkins : null } ,
374+ { visitor_checkins__created_at_day : new Date ( '2017-01-05T00:00:00.000Z' ) , visitor_checkins__google_sourced_checkins : 1 } ,
375375 ] ) ) ;
376376
377377 it ( 'ungrouped filtered distinct count' , ( ) => runQueryTest ( {
@@ -390,12 +390,12 @@ describe('MSSqlUngrouped', () => {
390390 ungrouped : true ,
391391 allowUngroupedWithoutPrimaryKey : true ,
392392 } , [
393+ { visitor_checkins__created_at_day : new Date ( '2017-01-02T00:00:00.000Z' ) , visitor_checkins__unique_google_sourced_checkins : null } ,
393394 { visitor_checkins__created_at_day : new Date ( '2017-01-03T00:00:00.000Z' ) , visitor_checkins__unique_google_sourced_checkins : null } ,
394395 { visitor_checkins__created_at_day : new Date ( '2017-01-04T00:00:00.000Z' ) , visitor_checkins__unique_google_sourced_checkins : null } ,
395- { visitor_checkins__created_at_day : new Date ( '2017-01-05T00:00:00.000Z' ) , visitor_checkins__unique_google_sourced_checkins : null } ,
396- { visitor_checkins__created_at_day : new Date ( '2017-01-05T00:00:00.000Z' ) , visitor_checkins__unique_google_sourced_checkins : null } ,
397- { visitor_checkins__created_at_day : new Date ( '2017-01-05T00:00:00.000Z' ) , visitor_checkins__unique_google_sourced_checkins : null } ,
398- { visitor_checkins__created_at_day : new Date ( '2017-01-06T00:00:00.000Z' ) , visitor_checkins__unique_google_sourced_checkins : 1 } ,
396+ { visitor_checkins__created_at_day : new Date ( '2017-01-04T00:00:00.000Z' ) , visitor_checkins__unique_google_sourced_checkins : null } ,
397+ { visitor_checkins__created_at_day : new Date ( '2017-01-04T00:00:00.000Z' ) , visitor_checkins__unique_google_sourced_checkins : null } ,
398+ { visitor_checkins__created_at_day : new Date ( '2017-01-05T00:00:00.000Z' ) , visitor_checkins__unique_google_sourced_checkins : 1 } ,
399399 ] ) ) ;
400400
401401 it ( 'ungrouped ratio measure' , ( ) => runQueryTest ( {
@@ -414,12 +414,12 @@ describe('MSSqlUngrouped', () => {
414414 ungrouped : true ,
415415 allowUngroupedWithoutPrimaryKey : true ,
416416 } , [
417+ { visitor_checkins__created_at_day : new Date ( '2017-01-02T00:00:00.000Z' ) , visitor_checkins__unique_sources_per_checking : 1 } ,
417418 { visitor_checkins__created_at_day : new Date ( '2017-01-03T00:00:00.000Z' ) , visitor_checkins__unique_sources_per_checking : 1 } ,
418419 { visitor_checkins__created_at_day : new Date ( '2017-01-04T00:00:00.000Z' ) , visitor_checkins__unique_sources_per_checking : 1 } ,
420+ { visitor_checkins__created_at_day : new Date ( '2017-01-04T00:00:00.000Z' ) , visitor_checkins__unique_sources_per_checking : 1 } ,
421+ { visitor_checkins__created_at_day : new Date ( '2017-01-04T00:00:00.000Z' ) , visitor_checkins__unique_sources_per_checking : 1 } ,
419422 { visitor_checkins__created_at_day : new Date ( '2017-01-05T00:00:00.000Z' ) , visitor_checkins__unique_sources_per_checking : 1 } ,
420- { visitor_checkins__created_at_day : new Date ( '2017-01-05T00:00:00.000Z' ) , visitor_checkins__unique_sources_per_checking : 1 } ,
421- { visitor_checkins__created_at_day : new Date ( '2017-01-05T00:00:00.000Z' ) , visitor_checkins__unique_sources_per_checking : 1 } ,
422- { visitor_checkins__created_at_day : new Date ( '2017-01-06T00:00:00.000Z' ) , visitor_checkins__unique_sources_per_checking : 1 } ,
423423 ] ) ) ;
424424
425425 it ( 'ungrouped' , ( ) => runQueryTest ( {
@@ -439,22 +439,22 @@ describe('MSSqlUngrouped', () => {
439439 ungrouped : true
440440 } , [ {
441441 visitors__id : 6 ,
442- visitors__created_at_day : new Date ( '2016-09-07T00 :00:00.000Z' )
442+ visitors__created_at_day : new Date ( '2016-09-06T00 :00:00.000Z' )
443443 } , {
444444 visitors__id : 1 ,
445- visitors__created_at_day : new Date ( '2017-01-03T00 :00:00.000Z' )
445+ visitors__created_at_day : new Date ( '2017-01-02T00 :00:00.000Z' )
446446 } , {
447447 visitors__id : 2 ,
448- visitors__created_at_day : new Date ( '2017-01-05T00 :00:00.000Z' )
448+ visitors__created_at_day : new Date ( '2017-01-04T00 :00:00.000Z' )
449449 } , {
450450 visitors__id : 3 ,
451- visitors__created_at_day : new Date ( '2017-01-06T00 :00:00.000Z' )
451+ visitors__created_at_day : new Date ( '2017-01-05T00 :00:00.000Z' )
452452 } , {
453453 visitors__id : 4 ,
454- visitors__created_at_day : new Date ( '2017-01-07T00 :00:00.000Z' )
454+ visitors__created_at_day : new Date ( '2017-01-06T00 :00:00.000Z' )
455455 } , {
456456 visitors__id : 5 ,
457- visitors__created_at_day : new Date ( '2017-01-07T00 :00:00.000Z' )
457+ visitors__created_at_day : new Date ( '2017-01-06T00 :00:00.000Z' )
458458 } ] ) ) ;
459459
460460 it ( 'offset cache' , ( ) => runQueryTest ( {
@@ -475,7 +475,7 @@ describe('MSSqlUngrouped', () => {
475475 offset : 5
476476 } , [ {
477477 visitors__id : 5 ,
478- visitors__created_at_day : new Date ( '2017-01-07T00 :00:00.000Z' )
478+ visitors__created_at_day : new Date ( '2017-01-06T00 :00:00.000Z' )
479479 } ] ) ) ;
480480
481481 it ( 'ungrouped without id' , ( ) => runQueryTest ( {
@@ -493,17 +493,17 @@ describe('MSSqlUngrouped', () => {
493493 ungrouped : true ,
494494 allowUngroupedWithoutPrimaryKey : true
495495 } , [ {
496- visitors__created_at_day : new Date ( '2016-09-07T00:00:00.000Z' )
496+ visitors__created_at_day : new Date ( '2016-09-06T00:00:00.000Z' )
497+ } , {
498+ visitors__created_at_day : new Date ( '2017-01-02T00:00:00.000Z' )
497499 } , {
498- visitors__created_at_day : new Date ( '2017-01-03T00 :00:00.000Z' )
500+ visitors__created_at_day : new Date ( '2017-01-04T00 :00:00.000Z' )
499501 } , {
500502 visitors__created_at_day : new Date ( '2017-01-05T00:00:00.000Z' )
501503 } , {
502504 visitors__created_at_day : new Date ( '2017-01-06T00:00:00.000Z' )
503505 } , {
504- visitors__created_at_day : new Date ( '2017-01-07T00:00:00.000Z' )
505- } , {
506- visitors__created_at_day : new Date ( '2017-01-07T00:00:00.000Z' )
506+ visitors__created_at_day : new Date ( '2017-01-06T00:00:00.000Z' )
507507 } ] ) ) ;
508508
509509 it ( 'ungrouped false without id' , ( ) => runQueryTest ( {
@@ -520,14 +520,14 @@ describe('MSSqlUngrouped', () => {
520520 timezone : 'America/Los_Angeles' ,
521521 ungrouped : false
522522 } , [ {
523- visitors__created_at_day : new Date ( '2016-09-07T00 :00:00.000Z' )
523+ visitors__created_at_day : new Date ( '2016-09-06T00 :00:00.000Z' )
524524 } , {
525- visitors__created_at_day : new Date ( '2017-01-03T00:00:00.000Z' )
525+ visitors__created_at_day : new Date ( '2017-01-02T00:00:00.000Z' )
526+ } , {
527+ visitors__created_at_day : new Date ( '2017-01-04T00:00:00.000Z' )
526528 } , {
527529 visitors__created_at_day : new Date ( '2017-01-05T00:00:00.000Z' )
528530 } , {
529531 visitors__created_at_day : new Date ( '2017-01-06T00:00:00.000Z' )
530- } , {
531- visitors__created_at_day : new Date ( '2017-01-07T00:00:00.000Z' )
532532 } ] ) ) ;
533533} ) ;
0 commit comments