Skip to content

Remove typed nulls#6633

Merged
nwt merged 4 commits intomainfrom
remove-typed-nulls
Feb 17, 2026
Merged

Remove typed nulls#6633
nwt merged 4 commits intomainfrom
remove-typed-nulls

Conversation

@nwt
Copy link
Member

@nwt nwt commented Feb 16, 2026

Nullable values of type T are now represented with a union of T and null.

Fixes #6607
Fixes #6331

@nwt nwt requested a review from a team February 16, 2026 23:52
Copy link
Collaborator

@mccanne mccanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A heroic PR. CJ Date would be proud.

@nwt nwt merged commit cbb4109 into main Feb 17, 2026
5 of 6 checks passed
@nwt nwt deleted the remove-typed-nulls branch February 17, 2026 01:18
nwt added a commit that referenced this pull request Feb 26, 2026
Since removal of typed nulls in #6633, a cast in SPQ of null to any type
other than null or a nullable union (i.e., a union containing null)
results in an error.  Since SQL allows a cast of null to any type, do
likewise in SPQ with the result of a cast to a non-null type being a
nullable union containing the null value.  For example, the result of
`null::int64` is `null::(int64|null)`.

Note that SUP retains the restriction that null can be cast only to null
or a nullable union.
nwt added a commit that referenced this pull request Feb 26, 2026
Since removal of typed nulls in #6633, a cast in SPQ of null to any type
other than null or a nullable union (i.e., a union containing null)
results in an error.  Since SQL allows a cast of null to any type, do
likewise in SPQ with the result of a cast to a non-null type being a
nullable union containing the null value.  For example, the result of
`null::int64` is `null::(int64|null)`.

Note that SUP retains the restriction that null can be cast only to null
or a nullable union.
nwt added a commit that referenced this pull request Feb 26, 2026
Since removal of typed nulls in #6633, a cast in SPQ of null to any type
other than null or a nullable union (i.e., a union containing null)
results in an error.  Since SQL allows a cast of null to any type, do
likewise in SPQ with the result of a cast to a non-null type being a
nullable union containing the null value.  For example, the result of
`null::int64` is `null::(int64|null)`.

Note that SUP retains the restriction that null can be cast only to null
or a nullable union.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vector runtime: sum aggregate with filter produces typed null instead of untyped null Casting array to float succeeds, but probably shouldn't

2 participants