pepijnve commented on PR #16196: URL: https://github.com/apache/datafusion/pull/16196#issuecomment-2922714438
After my previous comment I started thinking about how our Java code handles this kind of thing. Typically when we do a `Future#cancel(mayInterrupt: true)` we have `Thread#isInterrupted` checks in the async code and throw `InterruptedException` in response. Then we let the exception bubble up the stack and we're done. Would that maybe be an option? Have a cancellation token that rather than triggering `return Pending` triggers a `return Ready(Err(DataFusionError::ExecutionJoin))` or something similar. Error handling logic is already in place throughout the codebase and errors propagate nicely up the call chain. That might be a way to avoid having to sprinkle these checks all over the place in the codebase. -- 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