Skip to content

Commit f67c33b

Browse files
committed
fix(schema-compiler): Support member expression measures in error message in checkShouldBuildJoinForMeasureSelect
1 parent 6b56293 commit f67c33b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1983,8 +1983,9 @@ export class BaseQuery {
19831983
if (R.any(cubeName => keyCubeName !== cubeName, cubes)) {
19841984
const measuresJoin = this.joinGraph.buildJoin(joinHints);
19851985
if (measuresJoin.multiplicationFactor[keyCubeName]) {
1986+
const measureName = measure.isMemberExpression ? measure.expressionName : measure.measure;
19861987
throw new UserError(
1987-
`'${measure.measure}' references cubes that lead to row multiplication. Please rewrite it using sub query.`
1988+
`'${measureName}' references cubes that lead to row multiplication. Please rewrite it using sub query.`
19881989
);
19891990
}
19901991
return true;

0 commit comments

Comments
 (0)