Skip to content

Commit

Permalink
fix: all queries forwarded to external DB instead of original one for…
Browse files Browse the repository at this point in the history
… zero pre-aggregation query
  • Loading branch information
paveltiunov committed Sep 9, 2019
1 parent 3348da3 commit 2c230f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/cubejs-schema-compiler/adapter/BaseQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ class BaseQuery {
if (preAggregationForQuery && preAggregationForQuery.preAggregation.external) {
return true;
}
return R.all((p) => p.external, this.preAggregations.preAggregationsDescription());
const preAggregationsDescription = this.preAggregations.preAggregationsDescription();
return preAggregationsDescription.length && R.all((p) => p.external, preAggregationsDescription);
}
return false;
}
Expand Down

0 comments on commit 2c230f4

Please sign in to comment.