Commits


Eric Erhardt authored and Wes McKinney committed d2dbf1e169b
ARROW-4502: [C#] Add support for zero-copy reads - Update to the latest Google FlatBuffers code to support Spans/Memory. - Add a constructor for ArrowStreamReader that takes a ReadOnlyMemory<byte>. - Add a synchronous ReadNextRecordBatch() method. - Since we are now enabling Spans with FlatBuffers, we need to change the way we write to streams in the ArrowStreamWriter to use Memory<byte> instead of byte[]. This API is in netcoreapp2.1, but not in netstandard, so cross compile for netcoreapp2.1 and add a shim for netstandard. ~Unit tests are coming. I currently haven't found a great way to "read" arrow streams out of thin air. My initial thought is to use the writer to write some made up data, and then read it in using the reader and ensure the values coming back are the same. @wesm - does that sound like a good approach? I was using a binary file (that was written by PyArrow) locally to test this out.~ ~I also plan on adding some benchmark tests to compare between the Stream and the ReadOnlyMemory implementations, but again am having trouble with "how to get the stream to read?".~ @stephentoub @pgovind @chutchinson Author: Eric Erhardt <eric.erhardt@microsoft.com> Closes #3736 from eerhardt/ZeroCopyReads and squashes the following commits: 21f41bab6 <Eric Erhardt> Add RAT exclude for csharp benchmark tests csproj 558ec56ad <Eric Erhardt> Address PR feedback. 6ebc80e73 <Eric Erhardt> Add perf benchmarks for the ArrowStreamReader. 18db336a8 <Eric Erhardt> Respond to PR feedback. 98e1b11ff <Eric Erhardt> Add more types to tests. f6942cfab <Eric Erhardt> Add initial unit tests for ArrowStreamReader. f33e294c6 <Eric Erhardt> ARROW-4502: Add support for zero-copy reads