| commit | d34e65fc64c4205ca7f273544f9cfd63722703db | [log] [tgz] |
|---|---|---|
| author | Marco Antonio <mgrazianodecastro@gmail.com> | Sat Nov 01 18:34:23 2025 -0300 |
| committer | GitHub <noreply@github.com> | Sun Nov 02 06:34:23 2025 +0900 |
| tree | 60002107bfc48147ff2c718f28c39de6398d08da | |
| parent | 4e999d34752c4b42361345f6b04f7b7431d6ef83 [diff] |
feat: Add support for List data types (#39) ### Rationale within the changes This PR refactors and extends support for nested types in the Arrow integration. The current implementation of `ArrowNestedType` is tailored primarily for data structs, as seen in `StructBufferBuilder`. However, it lacks broader support and certain expected functionalities, such as `loadStructArrayBuilder`. To address this, the following improvements have been made: - Renamed `ArrowNestedType` to `ArrowTypeStruct` to align with naming conventions used elsewhere in the codebase. - Introduced initial support for `ArrowTypeList`, including nested lists. For simplicity, instead of introducing a dedicated subtype for lists, this PR uses an interface of `[Any?]?`. If this approach proves insufficient, there are more explicit alternatives that can be explored. **NOTE:** Work on `ArrowCExporter` and `ArrowCImporter` has been intentionally deferred. These components require a deeper understanding of memory ownership and child parsing, and I believe it's better to be addressed in a future PR, unless it's strict necessary. ### What's Changed 1. Renamed `ArrowNestedType -> ArrowTypeStruct`. 2. Added support for `ArrowTypeList`, including nested lists. 3. Implemented `ListArray` with basic `.asString` formatting. 4. Added `ListArrayBuilder`. 5. Extended `ArrowArrayBuilder` to support the `.list` type. 6. Implemented `loadStructArrayBuilder` and `loadListArrayBuilder`. 7. Introduced `ListBufferBuilder`. 8. Added `ArrowReader.loadListData`. 9. Added `makeListHolder`. ### Are these changes tested? Tests are included in `ArrayTests.swift`. It's also working on internal applications, including integration with `ArrowFlight`. Closes #16. --------- Co-authored-by: Marco <mgraziano@dadostech.com> Co-authored-by: Sutou Kouhei <kou@cozmixng.org> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Apache Arrow is a universal columnar format and multi-language toolbox for fast data interchange and in-memory analytics. It contains a set of technologies that enable data systems to efficiently store, process, and move data.
TODO: We should update this after we register this package to Swift Package Index.
TODO: We should refer auto generated documentation on Swift Package Index after we register this package to Swift Package Index.
Even if you do not plan to contribute to Apache Arrow itself or Apache Arrow integrations in other projects, we'd be happy to have you involved:
We prefer to receive contributions in the form of GitHub pull requests. Please send pull requests against the github.com/apache/arrow-swift repository.
If you are looking for some ideas on what to contribute, check out the GitHub Issues for the Apache Arrow Swift project. Comment on the issue, GitHub Discussions and/or contact dev@arrow.apache.org with your questions and ideas.
If you‘d like to report a bug but don’t have time to fix it, you can still post it on GitHub issues.