Skip to content

Commit c06216b

Browse files
committed
chore(schema-compiler): Improvement in evaluateSymbolSql()
1 parent 20ab491 commit c06216b

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2159,15 +2159,16 @@ export class BaseQuery {
21592159
const memberPathArray = [cubeName, name];
21602160
const memberPath = this.cubeEvaluator.pathFromArray(memberPathArray);
21612161
let type = memberExpressionType;
2162-
if (!type && this.cubeEvaluator.isMeasure(memberPathArray)) {
2163-
type = 'measure';
2164-
}
2165-
if (!type && this.cubeEvaluator.isDimension(memberPathArray)) {
2166-
type = 'dimension';
2167-
}
2168-
if (!type && this.cubeEvaluator.isSegment(memberPathArray)) {
2169-
type = 'segment';
2162+
if (!type) {
2163+
if (this.cubeEvaluator.isMeasure(memberPathArray)) {
2164+
type = 'measure';
2165+
} else if (this.cubeEvaluator.isDimension(memberPathArray)) {
2166+
type = 'dimension';
2167+
} else if (this.cubeEvaluator.isSegment(memberPathArray)) {
2168+
type = 'segment';
2169+
}
21702170
}
2171+
21712172
const parentMember = this.safeEvaluateSymbolContext().currentMember;
21722173
if (this.safeEvaluateSymbolContext().memberChildren && parentMember) {
21732174
this.safeEvaluateSymbolContext().memberChildren[parentMember] = this.safeEvaluateSymbolContext().memberChildren[parentMember] || [];

0 commit comments

Comments
 (0)