[ https://issues.apache.org/jira/browse/ARROW-5019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17662041#comment-17662041 ]
Rok Mihevc commented on ARROW-5019: ----------------------------------- This issue has been migrated to [issue #21517|https://github.com/apache/arrow/issues/21517] on GitHub. Please see the [migration documentation|https://github.com/apache/arrow/issues/14542] for further details. > [C#] ArrowStreamWriter doesn't work on a non-seekable stream > ------------------------------------------------------------ > > Key: ARROW-5019 > URL: https://issues.apache.org/jira/browse/ARROW-5019 > Project: Apache Arrow > Issue Type: Bug > Components: C# > Reporter: Eric Erhardt > Assignee: Eric Erhardt > Priority: Major > Labels: pull-request-available > Fix For: 0.14.0 > > Original Estimate: 48h > Time Spent: 26.5h > Remaining Estimate: 21.5h > > When writing to a non-seekable .NET Stream (like a network/socket stream), > ArrowStreamWriter will throw an exception: > > {code:java} > Exception thrown: 'System.NotSupportedException' in System.Net.Sockets.dll > This stream does not support seek operations. > {code} > The reason this throws is because we are using `BastStream.Position` in the > writer to calculate the length of bytes that we've written to the stream. We > don't need to use the Position in order to calculate the lengths. We should > be able to write an Arrow RecordBatch to a NetworkStream directly. Today, we > need to write to a MemoryStream, and then copy the MemoryStream to the > NetworkStream. > -- This message was sent by Atlassian Jira (v8.20.10#820010)