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
  • Loading branch information
Michael Hoffmann committed Jan 3, 2025
1 parent 9dbff30 commit d0576aa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions execution/aggregate/hashaggregate.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ 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
_, err := a.next.Series(ctx)
if 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 d0576aa

Please sign in to comment.