diff --git a/runtime/vam/op/summarize/summarize.go b/runtime/vam/op/summarize/summarize.go index 2bb2b9d28b..2d4aac9f47 100644 --- a/runtime/vam/op/summarize/summarize.go +++ b/runtime/vam/op/summarize/summarize.go @@ -63,7 +63,7 @@ func (s *Summarize) Pull(done bool) (vector.Any, error) { for _, t := range s.tables { s.results = append(s.results, t) } - s.tables = nil + clear(s.tables) return s.next(), nil } var keys, vals []vector.Any @@ -124,6 +124,7 @@ func (s *Summarize) isCountByString(keyTypes []super.Type) bool { func (s *Summarize) next() vector.Any { if len(s.results) == 0 { + s.results = nil return nil } t := s.results[0] diff --git a/runtime/sam/op/traverse/ztests/bare-scoped.yaml b/runtime/ztests/op/over-summarize.yaml similarity index 88% rename from runtime/sam/op/traverse/ztests/bare-scoped.yaml rename to runtime/ztests/op/over-summarize.yaml index ecb92a8e65..e84372ed4a 100644 --- a/runtime/sam/op/traverse/ztests/bare-scoped.yaml +++ b/runtime/ztests/op/over-summarize.yaml @@ -1,5 +1,7 @@ zed: over a => (sum(this)) +vector: true + input: | {a:null([int64])} {a:[6,5,4]}