Skip to content

Conversation

@LDeakin
Copy link
Member

@LDeakin LDeakin commented Oct 21, 2025

I'm still finalising an implementation, but here is a draft spec.

@jbms
Copy link
Contributor

jbms commented Oct 21, 2025

Looks good, the only issue I see is the fill value representation not allowing null for the base data type fill value, e.g. for a base data type of json or nested optional. Instead you could specify the base data type fill value in a single-element array:

null -> missing
[1] -> value of 1
[null] -> value of null

@mkitti
Copy link
Contributor

mkitti commented Oct 24, 2025

While I see the simplicity here of toggling between null and a type, I am wondering if there is a further opportunity to introduce a full type tag to implement tagged unions in Zarr.

@LDeakin
Copy link
Member Author

LDeakin commented Oct 28, 2025

not allowing null for the base data type fill value

I suppose it is a limitation, but I'd note that we don't have any data types that permit a null fill value. Can anyone think of any that might arise?

Also, for a multiply nested optional type like Option<Option<u8>>, you could potentially have the "null" at different levels. An implementation would have to track the "depth" of the fill value and change it each time it goes through the optional codec.

@d-v-b
Copy link
Contributor

d-v-b commented Oct 28, 2025

Can anyone think of any that might arise?

I think null will be a valid fill value for the JSON data type

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.

4 participants