Skip to content

add support for optional fields in records#6669

Merged
mccanne merged 4 commits intomainfrom
optional-fields-3
Feb 27, 2026
Merged

add support for optional fields in records#6669
mccanne merged 4 commits intomainfrom
optional-fields-3

Conversation

@mccanne
Copy link
Collaborator

@mccanne mccanne commented Feb 27, 2026

This commit adds support for optional fields in records making fusing of varied JSON data that arises from common sum types much more uniform. The SUP format is updated with a ? following field names to represent optional fields and _ to represent a field value that is not present.

While the SuperSQL parser can parse SUP literals with optional fields, record expressions do not yet support optional fields as this support will come in a subequent PR.

The vector representation encodes optional field columns by run-length encoding their presence and generates a slot map on demand when serializing to BSUP or when dereferencing a field to in turn generate a vector.Dynamic mixed with Missing error values.

This commit is not backward compatible with previous BSUP versions and we will update the BSUP version nunber in a subsequent PR prior to the RINCON release.

This commit adds support for optional fields in records making
fusing of varied JSON data that arises from common sum types much
more uniform.  The SUP format is updated with a ? following field
names to represent optional fields and _ to represent a field
value that is not present.

While the SuperSQL parser can parse SUP literals with optional
fields, record expressions do not yet support optional fields
as this support will come in a subequent PR.

The vector representation encodes optional field columns by
run-length encoding their presence and generates a slot map
on demand when serializing to BSUP or when dereferencing a field
to in turn generate a vector.Dynamic mixed with Missing error values.

This commit is not backward compatible with previous BSUP versions
and we will update the BSUP version nunber in a subsequent PR prior
to the RINCON release.
@mccanne mccanne merged commit a5bdf1e into main Feb 27, 2026
4 checks passed
@mccanne mccanne deleted the optional-fields-3 branch February 27, 2026 17:19
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.

2 participants