Skip to content

upgrade guide: collect() on empty stream returns null now instead of empty in 0.1.0 #86

@chrismo

Description

@chrismo

Repro

query="
  values [1,2,3]
  | unnest this
  | where false
  | collect(this)
"

export ASDF_SUPERDB_VERSION=0.51231; super -version; super -c "$query"
export ASDF_SUPERDB_VERSION=0.1.0; super -version; super -c "$query"
Version: v0.0.0-20251231185817-5ea0cb5d6f24
Version: v0.0.0-20260130205743-fd36be929cb5
null

0.51231 returns no output. 0.1.0+ returns null.

Downstream effect

this in null drops all records:

values ["a","b","c"] | unnest this | where not (this in null) | collect(this)
-- Returns: null

values ["a","b","c"] | unnest this | where not (this in []) | collect(this)
-- Returns: ["a","b","c"]

Hit this in production — collect(user_id) after filtering zero
matches returned null, passed into where not (this in ...),
which filtered out all results instead of preserving them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions