Skip to content

Commit

Permalink
execution: initialize next in aggregation even if we aggregate the la…
Browse files Browse the repository at this point in the history
…bels 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]>
  • Loading branch information
3 people authored Jan 3, 2025
1 parent 9dbff30 commit 41d0d9f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions execution/aggregate/hashaggregate.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ func (a *aggregate) initializeTables(ctx context.Context) error {
}

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

0 comments on commit 41d0d9f

Please sign in to comment.