Hi Daniel, You need to call either ArrowStreamWriter.end() or ArrowStreamWriter.close() when done writing batches to ensure the end-of-stream identifier is written. end() will just write the end-of-stream, while close() will call end() and then close the writer resources like the write channel.
On Fri, Sep 10, 2021 at 1:44 AM Daniel Hsu <[email protected]> wrote: > Hi, > > I noticed that I have been able to use an ArrowStreamWriter to write data > into a ByteArrayOutputStream and successfully read the data back out, > without needing to call ArrowStreamWriter # end() after I have finished > writing data to the stream. > > Is there any downside to not calling ArrowStreamWriter # end()? Also what > does end() is used for (the docs don't provide any explanation: > https://arrow.apache.org/docs/java/reference/org/apache/arrow/vector/ipc/ArrowWriter.html#end-- > )? > > Best, > Daniel >
