Skip to content

Commit

Permalink
fix: TypeError: Cannot read properties of undefined (reading 'joins')
Browse files Browse the repository at this point in the history
  • Loading branch information
paveltiunov committed Dec 16, 2024
1 parent 8ff2eca commit 14adaeb
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -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]);
}
Expand Down

0 comments on commit 14adaeb

Please sign in to comment.