Skip to content

Commit

Permalink
vam avg: Ignore non-numeric types (#5529)
Browse files Browse the repository at this point in the history
Closes #5524
  • Loading branch information
mattnibs authored Dec 12, 2024
1 parent 42187f8 commit 883ffd2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions runtime/vam/expr/agg/avg.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ type avg struct {
var _ Func = (*avg)(nil)

func (a *avg) Consume(vec vector.Any) {
if !super.IsNumber(vec.Type().ID()) {
return
}
var ncount uint32
if nulls := vector.NullsOf(vec); nulls != nil {
ncount = nulls.TrueCount()
Expand Down

0 comments on commit 883ffd2

Please sign in to comment.