Skip to content

Commit b348d66

Browse files
committed
Don't try to match pre-aggs if there are MemberExpressions
1 parent 8100ae5 commit b348d66

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,9 @@ export class BaseQuery {
706706
if (this.from) {
707707
return this.simpleQuery();
708708
}
709-
if (!this.options.preAggregationQuery && !this.customSubQueryJoins.length) {
709+
const hasMemberExpressions = this.allMembersConcat(false).some(m => m.isMemberExpression);
710+
711+
if (!this.options.preAggregationQuery && !this.customSubQueryJoins.length && !hasMemberExpressions) {
710712
preAggForQuery =
711713
this.preAggregations.findPreAggregationForQuery();
712714
if (this.options.disableExternalPreAggregations && preAggForQuery?.preAggregation.external) {

0 commit comments

Comments
 (0)