From c164aab31ec106bcff8dd26c305c3129a205f851 Mon Sep 17 00:00:00 2001 From: Pavel Tiunov Date: Sat, 16 May 2026 20:26:04 -0700 Subject: [PATCH] fix(schema-compiler): resolve time dimension granularity columns in pre-aggregation indexes (#10894) --- .../data-modeling/pre-aggregations.mdx | 55 ++++++- .../reference/pre-aggregations.mdx | 55 ++++++- .../src/adapter/BaseQuery.js | 11 ++ .../src/compiler/CubeEvaluator.ts | 6 +- .../test/unit/pre-aggregations.test.ts | 144 ++++++++++++++++++ .../smoke/schema/OrdersPAIndexGranularity.js | 61 ++++++++ .../test/smoke-postgres.test.ts | 69 +++++++++ 7 files changed, 388 insertions(+), 13 deletions(-) create mode 100644 packages/cubejs-testing/birdbox-fixtures/smoke/schema/OrdersPAIndexGranularity.js diff --git a/docs-mintlify/reference/data-modeling/pre-aggregations.mdx b/docs-mintlify/reference/data-modeling/pre-aggregations.mdx index 04eded6b6d99d..46e983ee14ee1 100644 --- a/docs-mintlify/reference/data-modeling/pre-aggregations.mdx +++ b/docs-mintlify/reference/data-modeling/pre-aggregations.mdx @@ -1571,9 +1571,8 @@ cube(`orders`, { -In the case that you want to reference the time dimension in the index, -the column name as a string in the following format can be used: -`__