@@ -6,9 +6,8 @@ class RefreshScheduler {
6
6
}
7
7
8
8
async refreshQueriesForPreAggregation ( context , compilerApi , preAggregation , queryingOptions ) {
9
- const dbType = compilerApi . getDbType ( ) ;
10
9
const compilers = await compilerApi . getCompilers ( ) ;
11
- const query = compilerApi . createQuery ( compilers , dbType , queryingOptions ) ;
10
+ const query = compilerApi . createQueryByDataSource ( compilers , queryingOptions ) ;
12
11
if ( preAggregation . preAggregation . partitionGranularity ) {
13
12
const dataSource = query . cubeDataSource ( preAggregation . cube ) ;
14
13
@@ -45,7 +44,7 @@ class RefreshScheduler {
45
44
dateRange
46
45
} ]
47
46
} ;
48
- const partitionQuery = compilerApi . createQuery ( compilers , dbType , baseQuery ) ;
47
+ const partitionQuery = compilerApi . createQueryByDataSource ( compilers , baseQuery ) ;
49
48
const { partitionDimension } = partitionQuery . preAggregations . partitionDimension ( preAggregation ) ;
50
49
return partitionDimension . timeSeries ( ) . map ( range => ( {
51
50
...baseQuery ,
@@ -116,9 +115,8 @@ class RefreshScheduler {
116
115
}
117
116
118
117
async refreshCubesRefreshKey ( context , compilerApi , queryingOptions ) {
119
- const dbType = compilerApi . getDbType ( ) ;
120
118
const compilers = await compilerApi . getCompilers ( ) ;
121
- const queryForEvaluation = compilerApi . createQuery ( compilers , dbType , { } ) ;
119
+ const queryForEvaluation = compilerApi . createQueryByDataSource ( compilers , { } ) ;
122
120
await Promise . all ( queryForEvaluation . cubeEvaluator . cubeNamesWithRefreshKeys ( ) . map ( async cube => {
123
121
const cubeFromPath = queryForEvaluation . cubeEvaluator . cubeFromPath ( cube ) ;
124
122
const measuresCount = Object . keys ( cubeFromPath . measures || { } ) . length ;
0 commit comments