@@ -1201,7 +1201,7 @@ describe('PreAggregations', () => {
1201
1201
} ) ;
1202
1202
} ) ;
1203
1203
1204
- it ( 'non-match because of join tree difference' , async ( ) => {
1204
+ it ( 'non-match because of join tree difference (through the view) ' , async ( ) => {
1205
1205
await compiler . compile ( ) ;
1206
1206
const query = new PostgresQuery ( { joinGraph, cubeEvaluator, compiler } , {
1207
1207
measures : [
@@ -1259,6 +1259,33 @@ describe('PreAggregations', () => {
1259
1259
} ) ;
1260
1260
} ) ;
1261
1261
1262
+ it ( 'non-match because of requesting only joined cube members' , async ( ) => {
1263
+ await compiler . compile ( ) ;
1264
+ const query = new PostgresQuery ( { joinGraph, cubeEvaluator, compiler } , {
1265
+ dimensions : [ 'visitor_checkins.source' ] ,
1266
+ order : [ {
1267
+ id : 'visitor_checkins.source'
1268
+ } ] ,
1269
+ timezone : 'America/Los_Angeles' ,
1270
+ preAggregationsSchema : ''
1271
+ } ) ;
1272
+
1273
+ const queryAndParams = query . buildSqlAndParams ( ) ;
1274
+ console . log ( queryAndParams ) ;
1275
+ expect ( ( < any > query ) . preAggregations . preAggregationForQuery ) . toBeUndefined ( ) ;
1276
+
1277
+ return dbRunner . evaluateQueryWithPreAggregations ( query ) . then ( res => {
1278
+ expect ( res ) . toEqual ( [
1279
+ {
1280
+ vc__source : 'google' ,
1281
+ } ,
1282
+ {
1283
+ vc__source : null ,
1284
+ } ,
1285
+ ] ) ;
1286
+ } ) ;
1287
+ } ) ;
1288
+
1262
1289
it ( 'non-leaf additive measure' , async ( ) => {
1263
1290
await compiler . compile ( ) ;
1264
1291
0 commit comments