Skip to content

Commit

Permalink
feat: originalSql external pre-aggregations support
Browse files Browse the repository at this point in the history
  • Loading branch information
paveltiunov committed Sep 8, 2019
1 parent aa860e4 commit 0db2282
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/cubejs-schema-compiler/adapter/BaseQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@ class BaseQuery {
if (preAggregationForQuery && preAggregationForQuery.preAggregation.external) {
return true;
}
return R.all((p) => p.external, this.preAggregations.preAggregationsDescription());
}
return false;
}

buildSqlAndParams() {
if (!this.options.preAggregationQuery && this.externalQueryClass) {
const preAggregationForQuery = this.preAggregations.findPreAggregationForQuery();
if (preAggregationForQuery && preAggregationForQuery.preAggregation.external) {
if (this.externalPreAggregationQuery()) { // TODO performance
const ExternalQuery = this.externalQueryClass;
return new ExternalQuery(this.compilers, {
...this.options,
Expand Down

0 comments on commit 0db2282

Please sign in to comment.