apache / arrow

Apache Arrow is the universal columnar format and multi-language toolbox for fast data interchange and in-memory analytics
https://arrow.apache.org/
Apache License 2.0
14.64k stars 3.55k forks source link

[Java] FlightStream: how to check whether data is available in the stream in a nonblocking way; #34600

Open bmmcq opened 1 year ago

bmmcq commented 1 year ago

Describe the usage question you have. Please include as many useful details as possible.

as the title: How to check whether data is available in the stream in a nonblocking way;

It seems that the FlightStream API only supports fetching data by calling the next() method in blocking; I think a nonblocking method like tryNext() should also be needed.

Component(s)

Java

lidavidm commented 1 year ago

Correct, there's not an async API. This has been discussed several times, but it would be a good amount of work to implement. #34221, #21039 are similarish issues - maybe I should file an overarching tracking issue.

lidavidm commented 1 year ago

I filed #34607 to try to centralize discussion about async APIs.

That said, it may be possible to add just a tryNext as a simple workaround in this case.