pepijnve commented on issue #16193:
URL: https://github.com/apache/datafusion/issues/16193#issuecomment-2916044328

   Just for context, I ran into this while working on a Java based application 
that drives the DataFusion queries. I want to be able to interrupt query 
execution from the Java side. From the Java side I'm basically calling 
`runtime.block_on(async { record_batch_stream.next().await })`. Since I can't 
use Java's thread interruption mechanism to unblock the `next()` call I was 
trying to use `tokio::select!` with a cancellation token instead and that 
failed to cancel. This is the same pattern as what the CLI does, just triggered 
via a different channel than a signal handler.
   
   I still need to write an experiment for this, but based on my reading of the 
documentation even with a `RecordBatchReceiverStream` the aggregate would not 
actually get cancelled. The `JoinSet` will get dropped and the spawned tasks 
will be aborted, but tokio will only actually be able to abort the loop once 
the aggregate's stream yields.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to