Skip to content

Commit 0163c01

Browse files
authored
chore: Reduce memory footprint for pre-aggregations with many partitions by caching partition SQL -- fix missing argument (#5941)
1 parent 52f0d23 commit 0163c01

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/cubejs-query-orchestrator/src/orchestrator/PreAggregations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1450,7 +1450,7 @@ export class PreAggregationPartitionRangeLoader {
14501450
this.requestId = options.requestId;
14511451
this.lambdaQuery = options.lambdaQuery;
14521452
this.dataSource = preAggregation.dataSource;
1453-
this.compilerCacheFn = options.compilerCacheFn || ((subKey, cacheFn) => cacheFn());
1453+
this.compilerCacheFn = options.compilerCacheFn || ((subKey, cacheFn) => { console.log(`!!!! cacheFn`, cacheFn); return cacheFn(); });
14541454
}
14551455

14561456
private async loadRangeQuery(rangeQuery: QueryTuple, partitionRange?: QueryDateRange) {

packages/cubejs-server-core/src/core/CompilerApi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export class CompilerApi {
148148
if (this.sqlCache) {
149149
return (subKey, cacheFn) => compilers.compilerCache.getQueryCache(key).cache(path.concat(subKey), cacheFn);
150150
} else {
151-
return (cacheFn) => cacheFn();
151+
return (subKey, cacheFn) => cacheFn();
152152
}
153153
}
154154

0 commit comments

Comments
 (0)