Skip to content

Commit 8773a11

Browse files
committed
fix(schema-compiler): Handle member expressions in keys in renderedReference
1 parent f67c33b commit 8773a11

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,9 +1055,14 @@ export class BaseQuery {
10551055
outerMeasuresJoinFullKeyQueryAggregate(innerMembers, outerMembers, toJoin) {
10561056
const renderedReferenceContext = {
10571057
renderedReference: R.pipe(
1058-
R.map(m => [m.measure || m.dimension, m.aliasName()]),
1058+
R.map(m => {
1059+
const member = m.measure ? m.measure : m.dimension;
1060+
const memberPath = typeof member === 'string'
1061+
? member
1062+
: this.cubeEvaluator.pathFromArray([m.expressionCubeName, m.expressionName]);
1063+
return [memberPath, m.aliasName()];
1064+
}),
10591065
R.fromPairs,
1060-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
10611066
)(innerMembers),
10621067
};
10631068

0 commit comments

Comments
 (0)