Skip to content

Commit dd8536b

Browse files
committed
fix: Empty default originalSql refreshKey
1 parent 54083ef commit dd8536b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

packages/cubejs-schema-compiler/adapter/BaseQuery.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,7 @@ class BaseQuery {
15371537
} else if (preAggregation.type === 'rollup') {
15381538
return this.preAggregations.rollupPreAggregationQuery(cube, preAggregation);
15391539
} else if (preAggregation.type === 'originalSql') {
1540-
return this.preAggregations.originalSqlPreAggregationQuery(cube, preAggregation);
1540+
return this;
15411541
}
15421542
}
15431543

packages/cubejs-schema-compiler/test/PreAggregationsTest.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,9 @@ describe('PreAggregations', function test() {
624624
const desc = preAggregationsDescription.find(desc => desc.tableName === 'visitors_multi_stage20170101');
625625
desc.invalidateKeyQueries[0][1][0].should.be.equal("2017-01-02T07:59:59Z");
626626

627+
const vcMainDesc = preAggregationsDescription.find(desc => desc.tableName === 'vc_main');
628+
vcMainDesc.invalidateKeyQueries.length.should.be.equal(1);
629+
627630
console.log(JSON.stringify(queries.concat(queryAndParams)));
628631

629632
return dbRunner.testQueries(

0 commit comments

Comments
 (0)