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

[Swift] Add class that implements the decoding protocol for the Swift Codable implementation #42020

Closed
abandy opened this issue Jun 6, 2024 · 1 comment

Comments

@abandy
Copy link
Contributor

abandy commented Jun 6, 2024

Describe the enhancement requested

As a Swift user I would like to be able to decode an Arrow RecordBatch to my custom type. This is functionality is similar to the Swift JSONDecoder.

Component(s)

Swift

@abandy abandy changed the title [Swift] Add class that implements the Swift Codable decoding protocols [Swift] Add class that implements the decoding protocol for the Swift Codable implementation Jun 6, 2024
abandy added a commit to abandy/arrow that referenced this issue Jun 7, 2024
abandy added a commit to abandy/arrow that referenced this issue Jun 7, 2024
abandy added a commit to abandy/arrow that referenced this issue Jun 7, 2024
abandy added a commit to abandy/arrow that referenced this issue Jun 7, 2024
kou pushed a commit that referenced this issue Jun 8, 2024
…#42023)

### Rationale for this change
This change implements decode for the Arrow Swift Codable implementation.  This allows the data in a RecordBatch to be copied to properties in a struct/class. 

The PR is a bit longer than desired but all three container types are required in order to implement the Decoder protocol.

### What changes are included in this PR?

The ArrowDecoder class is included in this PR along with a class for each container type (keyed, unkeyed, and single).  Most of the logic is encapsulated in the ArrowDecoder with minimal logic in each container class (Most of the methods in the container classes are a single line that calls the ArrowDecoder doDecode methods)

### Are these changes tested?

Yes, a test has been added to test the three types of containers provided by the decoder.

* GitHub Issue: #42020

Authored-by: Alva Bandy <abandy@live.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@kou
Copy link
Member

kou commented Jun 8, 2024

Issue resolved by pull request 42023
#42023

@kou kou added this to the 17.0.0 milestone Jun 8, 2024
@kou kou closed this as completed Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants