From 14adaebdd1c3d398bcd2997012da070999e47d9d Mon Sep 17 00:00:00 2001 From: Pavel Tiunov Date: Sun, 15 Dec 2024 20:29:05 -0800 Subject: [PATCH] fix: TypeError: Cannot read properties of undefined (reading 'joins') --- .../cubejs-schema-compiler/src/adapter/PreAggregations.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/cubejs-schema-compiler/src/adapter/PreAggregations.js b/packages/cubejs-schema-compiler/src/adapter/PreAggregations.js index 5e15e22ca5dea..efc642af9d727 100644 --- a/packages/cubejs-schema-compiler/src/adapter/PreAggregations.js +++ b/packages/cubejs-schema-compiler/src/adapter/PreAggregations.js @@ -1,5 +1,5 @@ import R from 'ramda'; -import { FROM_PARTITION_RANGE, TO_PARTITION_RANGE } from '@cubejs-backend/shared'; +import { FROM_PARTITION_RANGE, getEnv, TO_PARTITION_RANGE } from '@cubejs-backend/shared'; import { UserError } from '../compiler/UserError'; @@ -57,6 +57,10 @@ export class PreAggregations { } preAggregationCubes() { + if (getEnv('nativeSqlPlanner')) { + // No join defined in Tesseract + return []; + } const { join } = this.query; return join.joins.map(j => j.originalTo).concat([join.root]); }