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

[C#] Implement C Stream Interface in C# #33857

Closed
wjones127 opened this issue Jan 25, 2023 · 3 comments · Fixed by #35496
Closed

[C#] Implement C Stream Interface in C# #33857

wjones127 opened this issue Jan 25, 2023 · 3 comments · Fixed by #35496

Comments

@wjones127
Copy link
Member

Describe the enhancement requested

Follow up to #33856.

Component(s)

C#

@CurtHagenlocher
Copy link
Contributor

@wjones127, is this something you've already started work on? If not, I have a partial implementation that I can drive to completion.

@wjones127
Copy link
Member Author

@CurtHagenlocher well before we can do this we should start with the C Data interface for ArrowArrays. The one for ArrowSchema is about to be merged (#34133).

Would you be willing to start with a PR for the arrays? I haven't started that yet.

@CurtHagenlocher
Copy link
Contributor

Yes, I'd start with a PR for the arrays.

eerhardt pushed a commit that referenced this issue May 22, 2023
### Rationale for this change

This continues implementing the C Data Interface for C# with integration for `ArrowArray`, `RecordBatch` and streams.

### What changes are included in this PR?

- Adds classes `CArrowArray` and `CArrowStream` to represent the C API structures.
- Adds interface `IArrowArrayStream` to represent an array stream or record batch reader.
- Adds classes `CArrowArrayImporter`, `CArrowArrayExporter`, `CArrowArrayStreamImporter` and `CArrowArrayExporter` to marshal between C# and C representations.
- Augments the native memory representation to support (reasonably safe) ownership of memory by external code.

### Are these changes tested?

Yes. Testing is largely done via the Python C API interface.

### Are there any user-facing changes?

Yes, this adds new user-facing APIs to import and export C# structures using the C API.

**This PR includes breaking changes to public APIs.**

The default time unit for Time64Type was previously milliseconds. This does not appear to be valid, so it has been changed to nanoseconds.

- Closes: #33856
- Closes: #33857
* Closes: #33856

Authored-by: Curt Hagenlocher <curt@hagenlocher.org>
Signed-off-by: Eric Erhardt <eric.erhardt@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants