From 552a191fefea0388a069bedc7930278ffb824874 Mon Sep 17 00:00:00 2001 From: Alexandr Romanenko Date: Sat, 10 Feb 2024 04:26:24 +0300 Subject: [PATCH] fix: Error in queries with GROUP BY DIMENSION --- datafusion/src/cube_ext/rolling.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/datafusion/src/cube_ext/rolling.rs b/datafusion/src/cube_ext/rolling.rs index 1692124ca019..f22222b92ae4 100644 --- a/datafusion/src/cube_ext/rolling.rs +++ b/datafusion/src/cube_ext/rolling.rs @@ -702,6 +702,12 @@ impl ExecutionPlan for RollingWindowAggExec { append_value(out_aggs[i].as_mut(), &null)?; } } + for i in 0..out_extra_aggs.len() { + let null = &extra_agg_nulls[i]; + for _ in 0..num_empty_dims { + append_value(out_extra_aggs[i].as_mut(), &null)?; + } + } for _ in 0..num_empty_dims { out_aggs_keep.append_value(true)?; }