diff --git a/packages/cubejs-schema-compiler/src/adapter/BaseQuery.js b/packages/cubejs-schema-compiler/src/adapter/BaseQuery.js index 6f28643cb6e78..f52d591352ab8 100644 --- a/packages/cubejs-schema-compiler/src/adapter/BaseQuery.js +++ b/packages/cubejs-schema-compiler/src/adapter/BaseQuery.js @@ -2865,12 +2865,9 @@ export class BaseQuery { } newSubQueryForCube(cube, options) { - if (this.options.queryFactory) { - options.paramAllocator = null; - return this.options.queryFactory.createQuery(cube, this.compilers, this.subQueryOptions(options)); - } - - return this.newSubQuery(options); + return this.options.queryFactory + ? this.options.queryFactory.createQuery(cube, this.compilers, this.subQueryOptions(options)) + : this.newSubQuery(options); } subQueryOptions(options) {