Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify the Struct::field API #1513

Open
gatesn opened this issue Nov 29, 2024 · 0 comments
Open

Clarify the Struct::field API #1513

gatesn opened this issue Nov 29, 2024 · 0 comments

Comments

@gatesn
Copy link
Contributor

gatesn commented Nov 29, 2024

Currently, all encodings that support the struct DType implement the StructVariant trait. This primarily allows accessing the fields of the struct array by index and by name.

However, the null-semantics for this are not well defined when both the struct array and the field have validity masks.

Perhaps it should be StructVariant::maybe_null_field, or perhaps the Struct::field should return an array with the intersection of the validity.

The latter option would mean that calling StructArray::field(0) on {a: i32}? could return i32? and not necessarily the field DType i32 that might be expected.

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

No branches or pull requests

1 participant