Re: [JAVA] Total row count of an Arrow file

2018-09-24 Thread Michael Knopf
Hi Li, Thanks for the explanation! I’ll keep the code as is for now (and an eye on ARROW-3283). As you pointed out, I’ll need another solution for streaming the table over a socket anyway. To clarify, my code does read the actual data in a second pass. However, doing so without knowing how m

Re: [JAVA] Total row count of an Arrow file

2018-09-21 Thread Wes McKinney
It would be nice to have an API to look at the file footer (we don't have one in C++ either), I opened https://issues.apache.org/jira/browse/ARROW-3283 On Fri, Sep 21, 2018 at 10:32 AM Li Jin wrote: > > Hi Michael, > > I think ArrowFileReader takes SeekableByteChannel so it's possible to only > r

Re: [JAVA] Total row count of an Arrow file

2018-09-21 Thread Li Jin
Hi Michael, I think ArrowFileReader takes SeekableByteChannel so it's possible to only read the metadata for each record batches and skip the data. However it is not implemented. If the input Channel is not seekable (for example, a socket channel) then you would need to read the body for each rec