diff --git a/docs/tutorials/schools.md b/docs/tutorials/schools.md index daeacc4d3a..aeeeae318c 100644 --- a/docs/tutorials/schools.md +++ b/docs/tutorials/schools.md @@ -1013,7 +1013,8 @@ and produces Schools: [ "Auberry Elementary", "Balch Camp Elementary", - "Pine Ridge Elementary" + "Pine Ridge Elementary", + null (string) ] } { @@ -1023,9 +1024,7 @@ and produces "www.bigcreekschool.com" ], Schools: [ - "Big Creek Elementary" - ] -} + "Big Creek Elementary", ... ``` diff --git a/runtime/sam/expr/agg/collect.go b/runtime/sam/expr/agg/collect.go index 1877eb048b..030e31d8bb 100644 --- a/runtime/sam/expr/agg/collect.go +++ b/runtime/sam/expr/agg/collect.go @@ -16,9 +16,7 @@ type Collect struct { var _ Function = (*Collect)(nil) func (c *Collect) Consume(val zed.Value) { - if !val.IsNull() { - c.update(val) - } + c.update(val) } func (c *Collect) update(val zed.Value) { diff --git a/runtime/sam/expr/agg/ztests/collect-untag-unions.yaml b/runtime/sam/expr/agg/ztests/collect-untag-unions.yaml index b94ea627fe..8f1bb1b9f7 100644 --- a/runtime/sam/expr/agg/ztests/collect-untag-unions.yaml +++ b/runtime/sam/expr/agg/ztests/collect-untag-unions.yaml @@ -4,6 +4,7 @@ input: | 1((int64,string)) "foo"((time,string)) 0.5 + null(string) output: | - [1,"foo",0.5] + [1,"foo",0.5,null]