Skip to content

Commit 41d0d9f

Browse files
execution: initialize next in aggregation even if we aggregate the labels away (#504)
* execution: initialize next in aggregation even if we aggregate the labels away Signed-off-by: Michael Hoffmann <[email protected]> * execute: review on execution/aggregate/hashaggregate.go Co-authored-by: Filip Petkovski <[email protected]> Signed-off-by: Michael Hoffmann <[email protected]> --------- Signed-off-by: Michael Hoffmann <[email protected]> Signed-off-by: Michael Hoffmann <[email protected]> Co-authored-by: Michael Hoffmann <[email protected]> Co-authored-by: Filip Petkovski <[email protected]>
1 parent 9dbff30 commit 41d0d9f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

execution/aggregate/hashaggregate.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ func (a *aggregate) initializeTables(ctx context.Context) error {
220220
}
221221

222222
func (a *aggregate) initializeVectorizedTables(ctx context.Context) ([]aggregateTable, []labels.Labels, error) {
223+
// perform initialization of the underlying operator even if we are aggregating the labels away
224+
if _, err := a.next.Series(ctx); err != nil {
225+
return nil, nil, err
226+
}
223227
tables, err := newVectorizedTables(a.stepsBatch, a.aggregation)
224228
if errors.Is(err, parse.ErrNotSupportedExpr) {
225229
return a.initializeScalarTables(ctx)

0 commit comments

Comments
 (0)