Commits


Curt Hagenlocher authored and GitHub committed 0dca449f401
GH-33856: [C#] Implement C Data Interface for C# (#35496) ### 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>