@@ -968,6 +968,80 @@ SELECT 1 AS revenue, cast('2024-01-01' AS timestamp) as time UNION ALL
968968 }
969969 ] ) ) ;
970970
971+ it ( 'rolling window with two time dimension granularities one custom one regular' , async ( ) => runQueryTest ( {
972+
973+ measures : [
974+ 'visitors.countRollingWeekToDate'
975+ ] ,
976+ timeDimensions : [
977+ {
978+ dimension : 'visitors.created_at' ,
979+ granularity : 'three_days' ,
980+ dateRange : [ '2017-01-01' , '2017-01-10' ]
981+ } ,
982+ {
983+ dimension : 'visitors.created_at' ,
984+ granularity : 'day' ,
985+ dateRange : [ '2017-01-01' , '2017-01-10' ]
986+ }
987+ ] ,
988+ order : [ {
989+ id : 'visitors.created_at'
990+ } ] ,
991+ timezone : 'America/Los_Angeles'
992+ } , [
993+ {
994+ visitors__count_rolling_week_to_date : null ,
995+ visitors__created_at_day : '2017-01-01T00:00:00.000Z' ,
996+ visitors__created_at_three_days : '2017-01-01T00:00:00.000Z' ,
997+ } ,
998+ {
999+ visitors__count_rolling_week_to_date : '1' ,
1000+ visitors__created_at_day : '2017-01-02T00:00:00.000Z' ,
1001+ visitors__created_at_three_days : '2017-01-01T00:00:00.000Z' ,
1002+ } ,
1003+ {
1004+ visitors__count_rolling_week_to_date : '1' ,
1005+ visitors__created_at_day : '2017-01-03T00:00:00.000Z' ,
1006+ visitors__created_at_three_days : '2017-01-01T00:00:00.000Z' ,
1007+ } ,
1008+ {
1009+ visitors__count_rolling_week_to_date : '2' ,
1010+ visitors__created_at_day : '2017-01-04T00:00:00.000Z' ,
1011+ visitors__created_at_three_days : '2017-01-04T00:00:00.000Z' ,
1012+ } ,
1013+ {
1014+ visitors__count_rolling_week_to_date : '3' ,
1015+ visitors__created_at_day : '2017-01-05T00:00:00.000Z' ,
1016+ visitors__created_at_three_days : '2017-01-04T00:00:00.000Z' ,
1017+ } ,
1018+ {
1019+ visitors__count_rolling_week_to_date : '5' ,
1020+ visitors__created_at_day : '2017-01-06T00:00:00.000Z' ,
1021+ visitors__created_at_three_days : '2017-01-04T00:00:00.000Z' ,
1022+ } ,
1023+ {
1024+ visitors__count_rolling_week_to_date : '5' ,
1025+ visitors__created_at_day : '2017-01-07T00:00:00.000Z' ,
1026+ visitors__created_at_three_days : '2017-01-07T00:00:00.000Z' ,
1027+ } ,
1028+ {
1029+ visitors__count_rolling_week_to_date : '5' ,
1030+ visitors__created_at_day : '2017-01-08T00:00:00.000Z' ,
1031+ visitors__created_at_three_days : '2017-01-07T00:00:00.000Z' ,
1032+ } ,
1033+ {
1034+ visitors__count_rolling_week_to_date : null ,
1035+ visitors__created_at_day : '2017-01-09T00:00:00.000Z' ,
1036+ visitors__created_at_three_days : '2017-01-07T00:00:00.000Z' ,
1037+ } ,
1038+ {
1039+ visitors__count_rolling_week_to_date : null ,
1040+ visitors__created_at_day : '2017-01-10T00:00:00.000Z' ,
1041+ visitors__created_at_three_days : '2017-01-10T00:00:00.000Z' ,
1042+ }
1043+ ] ) ) ;
1044+
9711045 it ( 'two rolling windows with two time dimension granularities' , async ( ) => runQueryTest ( {
9721046 measures : [
9731047 'visitors.countRollingUnbounded' ,
0 commit comments