File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed
cubejs-server-core/src/core Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ declare module '@cubejs-client/core' {
151
151
measureToLeafMeasures ?: Record < string , LeafMeasure [ ] > ;
152
152
} ;
153
153
154
- export type PreAggregationType = 'rollup' | 'rollupJoin' | 'originalSql' ;
154
+ export type PreAggregationType = 'rollup' | 'rollupJoin' | 'rollupLambda' | ' originalSql';
155
155
156
156
type UsedPreAggregation = {
157
157
targetTableName : string ;
Original file line number Diff line number Diff line change @@ -302,9 +302,10 @@ export class RefreshScheduler {
302
302
const { timezones } = queryingOptions ;
303
303
const { partitions : partitionsFilter , cacheOnly } = preAggregationsQueryingOptions [ preAggregation . id ] || { } ;
304
304
305
- const isRollupJoin = preAggregation ?. preAggregation ?. type === 'rollupJoin' ;
305
+ const type = preAggregation ?. preAggregation ?. type ;
306
+ const isEphemeralPreAggregation = type === 'rollupJoin' || type === 'rollupLambda' ;
306
307
307
- const queriesForPreAggregation : RefreshQueries [ ] = ! isRollupJoin && ( await Promise . all (
308
+ const queriesForPreAggregation : RefreshQueries [ ] = ! isEphemeralPreAggregation && ( await Promise . all (
308
309
timezones . map ( async timezone => this . refreshQueriesForPreAggregation (
309
310
context ,
310
311
compilerApi ,
Original file line number Diff line number Diff line change 1
1
import R from 'ramda' ;
2
2
import { StartedTestContainer } from 'testcontainers' ;
3
3
import { pausePromise } from '@cubejs-backend/shared' ;
4
+ import fetch from 'node-fetch' ;
4
5
import { PostgresDBRunner } from '@cubejs-backend/testing-shared' ;
5
6
import cubejs , { CubejsApi , Query } from '@cubejs-client/core' ;
6
7
// eslint-disable-next-line import/no-extraneous-dependencies
@@ -278,4 +279,15 @@ describe('lambda', () => {
278
279
await runScheduledRefresh ( client ) ;
279
280
await checkCubestoreState ( cubestore ) ;
280
281
} ) ;
282
+
283
+ it ( 'Pre-aggregations API' , async ( ) => {
284
+ const preAggs = await fetch ( `${ birdbox . configuration . playgroundUrl } /cubejs-system/v1/pre-aggregations` , {
285
+ method : 'GET' ,
286
+ headers : {
287
+ Authorization : ''
288
+ } ,
289
+ } ) ;
290
+ console . log ( await preAggs . json ( ) ) ;
291
+ expect ( preAggs . status ) . toBe ( 200 ) ;
292
+ } ) ;
281
293
} ) ;
You can’t perform that action at this time.
0 commit comments