File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
packages/cubejs-query-orchestrator Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -458,7 +458,7 @@ type LoadPreAggregationResult = {
458458 targetTableName : string ;
459459 refreshKeyValues : any [ ] ;
460460 lastUpdatedAt : number ;
461- buildRangeEnd ? : string ;
461+ buildRangeEnd : string ;
462462 lambdaTable ?: InlineTable ;
463463 queryKey ?: any [ ] ;
464464 rollupLambdaId ?: string ;
@@ -586,8 +586,9 @@ export class PreAggregationLoader {
586586 // immediately return the latest rollup data that instance already has
587587 return {
588588 targetTableName : this . targetTableName ( versionEntryByStructureVersion ) ,
589- lastUpdatedAt : versionEntryByStructureVersion . last_updated_at ,
590589 refreshKeyValues : [ ] ,
590+ lastUpdatedAt : versionEntryByStructureVersion . last_updated_at ,
591+ buildRangeEnd : versionEntryByStructureVersion . build_range_end ,
591592 } ;
592593 }
593594 }
@@ -726,6 +727,7 @@ export class PreAggregationLoader {
726727 targetTableName,
727728 refreshKeyValues : [ ] ,
728729 lastUpdatedAt : newVersionEntry . last_updated_at ,
730+ buildRangeEnd : this . preAggregation . buildRangeEnd ,
729731 } ;
730732 } else {
731733 await this . executeInQueue ( invalidationKeys , this . priority ( 10 ) , newVersionEntry ) ;
Original file line number Diff line number Diff line change @@ -1228,6 +1228,13 @@ describe('QueryOrchestrator', () => {
12281228 result = await queryOrchestrator . fetchQuery ( query ( [ '2021-05-31T00:00:00.000' , '2021-05-31T23:59:59.999' ] ) ) ;
12291229 console . log ( JSON . stringify ( result , null , 2 ) ) ;
12301230 expect ( result . data [ 0 ] ) . toMatch ( / o r d e r s _ h 2 0 2 1 0 5 3 1 0 0 / ) ;
1231+
1232+ result = await queryOrchestratorExternalRefresh . fetchQuery ( query ( ) ) ;
1233+ console . log ( JSON . stringify ( result , null , 2 ) ) ;
1234+ expect ( result . data [ 0 ] ) . toMatch ( / o r d e r s _ d 2 0 2 1 0 5 0 1 / ) ;
1235+ expect ( result . data [ 0 ] ) . not . toMatch ( / o r d e r s _ h 2 0 2 1 0 5 3 0 0 0 / ) ;
1236+ expect ( result . data [ 0 ] ) . toMatch ( / o r d e r s _ h 2 0 2 1 0 5 3 1 0 0 / ) ;
1237+ expect ( result . data [ 0 ] ) . toMatch ( / o r d e r s _ h 2 0 2 1 0 6 0 1 0 0 _ u o z k y a u r _ d 0 0 4 i q 5 1 / ) ;
12311238 } ) ;
12321239
12331240 test ( 'loadRefreshKeys' , async ( ) => {
You can’t perform that action at this time.
0 commit comments