Skip to content

Commit 767a71e

Browse files
committed
Don't try to match pre-aggs if there are MemberExpressions
1 parent cd6946d commit 767a71e

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
@@ -632,7 +632,9 @@ export class BaseQuery {
632632
if (this.from) {
633633
return this.simpleQuery();
634634
}
635-
if (!this.options.preAggregationQuery && !this.customSubQueryJoins.length) {
635+
const hasMemberExpressions = this.allMembersConcat(false).some(m => m.isMemberExpression);
636+
637+
if (!this.options.preAggregationQuery && !this.customSubQueryJoins.length && !hasMemberExpressions) {
636638
preAggForQuery =
637639
this.preAggregations.findPreAggregationForQuery();
638640
if (this.options.disableExternalPreAggregations && preAggForQuery?.preAggregation.external) {

0 commit comments

Comments
 (0)