@@ -1211,7 +1211,7 @@ describe('PreAggregations', () => {
1211
1211
} ) ;
1212
1212
} ) ;
1213
1213
1214
- it ( 'non-match because of join tree difference' , async ( ) => {
1214
+ it ( 'non-match because of join tree difference (through the view) ' , async ( ) => {
1215
1215
await compiler . compile ( ) ;
1216
1216
const query = new PostgresQuery ( { joinGraph, cubeEvaluator, compiler } , {
1217
1217
measures : [
@@ -1269,6 +1269,33 @@ describe('PreAggregations', () => {
1269
1269
} ) ;
1270
1270
} ) ;
1271
1271
1272
+ it ( 'non-match because of requesting only joined cube members' , async ( ) => {
1273
+ await compiler . compile ( ) ;
1274
+ const query = new PostgresQuery ( { joinGraph, cubeEvaluator, compiler } , {
1275
+ dimensions : [ 'visitor_checkins.source' ] ,
1276
+ order : [ {
1277
+ id : 'visitor_checkins.source'
1278
+ } ] ,
1279
+ timezone : 'America/Los_Angeles' ,
1280
+ preAggregationsSchema : ''
1281
+ } ) ;
1282
+
1283
+ const queryAndParams = query . buildSqlAndParams ( ) ;
1284
+ console . log ( queryAndParams ) ;
1285
+ expect ( ( < any > query ) . preAggregations . preAggregationForQuery ) . toBeUndefined ( ) ;
1286
+
1287
+ return dbRunner . evaluateQueryWithPreAggregations ( query ) . then ( res => {
1288
+ expect ( res ) . toEqual ( [
1289
+ {
1290
+ vc__source : 'google' ,
1291
+ } ,
1292
+ {
1293
+ vc__source : null ,
1294
+ } ,
1295
+ ] ) ;
1296
+ } ) ;
1297
+ } ) ;
1298
+
1272
1299
it ( 'non-leaf additive measure' , async ( ) => {
1273
1300
await compiler . compile ( ) ;
1274
1301
0 commit comments