Skip to content

Commit 0db02fc

Browse files
committed
update joinTreeForHints() with skipQueryJoinMap flag
1 parent 85d238c commit 0db02fc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,12 +388,14 @@ export class BaseQuery {
388388

389389
/**
390390
* This function follows the same logic as in this.collectJoinHints()
391+
* skipQueryJoinMap is used by PreAggregations to build join tree without user's query all members map
391392
* @public
392393
* @param {Array<(Array<string> | string)>} hints
394+
* @param { boolean } skipQueryJoinMap
393395
* @return {import('../compiler/JoinGraph').FinishedJoinTree}
394396
*/
395-
joinTreeForHints(hints) {
396-
const queryJoinMaps = this.queryJoinMap();
397+
joinTreeForHints(hints, skipQueryJoinMap = false) {
398+
const queryJoinMaps = skipQueryJoinMap ? {} : this.queryJoinMap();
397399
let newCollectedHints = [];
398400

399401
const constructJH = () => R.uniq(this.enrichHintsWithJoinMap([

0 commit comments

Comments
 (0)