jding-xyz opened a new pull request, #149: URL: https://github.com/apache/arrow-swift/pull/149
## Summary `ArrowWriter` currently cannot serialize schemas containing `list<T>` columns. The `toFBTypeEnum` and `toFBType` functions in `ArrowWriterHelper.swift` do not handle the `.list` type ID, and `ArrowWriter.swift` does not recurse into list children when writing field nodes, buffer info, or record batch data. This PR adds list type support to the writer: - **`ArrowWriterHelper.swift`**: Added `.list` case to `toFBTypeEnum` (returns `.list` FlatBuffer type enum) and `toFBType` (creates empty `org_apache_arrow_flatbuf_List` table). - **`ArrowWriter.swift`**: Added `ArrowTypeList` handling in `writeField`, `writeFieldNodes`, `writeBufferInfo`, and `writeRecordBatchData` — mirrors the existing `ArrowTypeStruct` pattern but uses `ArrowTypeList.elementField` and `NestedArray.values` for the single child array. - Also moved the nested-type recursion in `writeBufferInfo` and `writeRecordBatchData` outside the inner buffer loop, so it runs once per column rather than once per buffer (a latent correctness issue for types with multiple buffers). ## Test plan - Verified all existing tests pass (`swift test` — only pre-existing fixture-file-missing failures). - Round-trip tested with `list<float32>` schema: encode via `ArrowWriter.writeStreaming`, decode via `ArrowReader.readStreaming`, verified schema fields and row count survive. - Tested alongside the timestamp nesting fix from #148 (independent change). Made with [Cursor](https://cursor.com) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
