Skip to content

Commit

Permalink
Revert "wip: breaking the loop"
Browse files Browse the repository at this point in the history
This reverts commit 6db376f.
  • Loading branch information
KSDaemon committed Oct 28, 2024
1 parent 4609eca commit 472338e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/cubejs-schema-compiler/src/adapter/BaseQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -3888,15 +3888,13 @@ export class BaseQuery {
// allBackAliasMembersExceptSegments() -> collectFrom() -> traverseSymbol() -> evaluateSymbolSql() ->
// autoPrefixAndEvaluateSql() -> evaluateSql() -> filterProxyFromAllFilters->Proxy->toString()
// and so on...
const groupMember = cubeEvaluator.pathFromArray([cubeNameObj.cube, propertyName]);
const aliases = allFilters ?
allFilters
// No need to collect aliases for itself
.filter(v => (v.query ? v.query.safeEvaluateSymbolContext().currentMember !== groupMember : true))
.map(v => (v.query ? v.query.allBackAliasMembersExceptSegments() : {}))
.reduce((a, b) => ({ ...a, ...b }), {})
: {};
// Filtering aliases that somehow relate to this group member
const groupMember = cubeEvaluator.pathFromArray([cubeNameObj.cube, propertyName]);
const aliasesForGroupMembers = Object.entries(aliases)
.filter(([key, _value]) => key === groupMember)
.map(([_key, value]) => value);
Expand Down

0 comments on commit 472338e

Please sign in to comment.