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

Array Constructor for Lists/Structs #298

Open
aersam opened this issue Mar 11, 2025 · 3 comments
Open

Array Constructor for Lists/Structs #298

aersam opened this issue Mar 11, 2025 · 3 comments

Comments

@aersam
Copy link

aersam commented Mar 11, 2025

Hi guys

I try creating an Array of a List of Structs, seems not be implemented yet:

NotImplementedError: Array constructor for List(Field { name: "", data_type: Struct([Field { name: "quantity", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "price", data_type: Float64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, Field { name: "rebate", data_type: Float64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }]), nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }) not yet implemented.

Or am I supposed to pass data differently? Is it possible to create an array of lists already from python objects somehow?

@kylebarron
Copy link
Owner

Please provide a minimal reproducible example.

There are also specific constructors for list, fixed size list, and struct: https://kylebarron.dev/arro3/latest/api/core/constructors/#arro3.core

@aersam
Copy link
Author

aersam commented Mar 11, 2025

Ah ok, I see, I should use these methods, I'll try. However nulls/None seem not to be supported by them?

@kylebarron
Copy link
Owner

We can add a mask argument there. It would be nice to also add support in the primary constructor but handling nested types seems kinda hard. A PR is welcome though!

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

2 participants