Skip to content

Commit

Permalink
fix: Empty default originalSql refreshKey
Browse files Browse the repository at this point in the history
  • Loading branch information
paveltiunov committed Mar 29, 2020
1 parent 54083ef commit dd8536b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cubejs-schema-compiler/adapter/BaseQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,7 @@ class BaseQuery {
} else if (preAggregation.type === 'rollup') {
return this.preAggregations.rollupPreAggregationQuery(cube, preAggregation);
} else if (preAggregation.type === 'originalSql') {
return this.preAggregations.originalSqlPreAggregationQuery(cube, preAggregation);
return this;
}
}

Expand Down
3 changes: 3 additions & 0 deletions packages/cubejs-schema-compiler/test/PreAggregationsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,9 @@ describe('PreAggregations', function test() {
const desc = preAggregationsDescription.find(desc => desc.tableName === 'visitors_multi_stage20170101');
desc.invalidateKeyQueries[0][1][0].should.be.equal("2017-01-02T07:59:59Z");

const vcMainDesc = preAggregationsDescription.find(desc => desc.tableName === 'vc_main');
vcMainDesc.invalidateKeyQueries.length.should.be.equal(1);

console.log(JSON.stringify(queries.concat(queryAndParams)));

return dbRunner.testQueries(
Expand Down

0 comments on commit dd8536b

Please sign in to comment.