Skip to content

Commit 57571be

Browse files
committed
fix
1 parent d5fd502 commit 57571be

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,10 @@ export class BaseQuery {
289289
}).filter(R.identity).map(this.newTimeDimension.bind(this));
290290
this.allFilters = this.timeDimensions.concat(this.segments).concat(this.filters);
291291
this.useNativeSqlPlanner = this.options.useNativeSqlPlanner ?? getEnv('nativeSqlPlanner');
292+
this.canUseNativeSqlPlannerPreAggregation = false;
292293
if (this.useNativeSqlPlanner) {
293294
const hasMultiStageMeasures = this.fullKeyQueryAggregateMeasures({ hasMultipliedForPreAggregation: true }).multiStageMembers.length > 0;
294295
this.canUseNativeSqlPlannerPreAggregation = hasMultiStageMeasures;
295-
} else {
296-
this.useNativePreAggregations = false;
297296
}
298297
this.prebuildJoin();
299298

packages/cubejs-schema-compiler/src/compiler/CubeValidator.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ const measureTypeWithCount = Joi.string().valid(
560560
);
561561

562562
const multiStageMeasureType = Joi.string().valid(
563-
'count', 'number', 'string', 'boolean', 'time', 'sum', 'avg', 'min', 'max', 'countDistinct', 'runningTotal', 'countDistinctApprox',
563+
'count', 'number', 'string', 'boolean', 'time', 'sum', 'avg', 'min', 'max', 'countDistinct', 'runningTotal', 'countDistinctApprox', 'numberAgg',
564564
'rank'
565565
);
566566

rust/cubesqlplanner/cubesqlplanner/src/planner/sql_evaluator/sql_nodes/final_measure.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,8 @@ impl SqlNode for FinalMeasureSqlNode {
5959
node_processor.clone(),
6060
templates,
6161
)?;
62-
//};
6362

64-
if ev.is_calculated() {
63+
if ev.is_calculated() || ev.measure_type() == "numberAgg" {
6564
input
6665
} else if ev.measure_type() == "countDistinctApprox" {
6766
if self.count_approx_as_state {

0 commit comments

Comments
 (0)