rtpsw commented on code in PR #35953:
URL: https://github.com/apache/arrow/pull/35953#discussion_r1220173894
##########
cpp/src/arrow/acero/exec_plan.h:
##########
@@ -602,6 +603,9 @@ struct ARROW_ACERO_EXPORT QueryOptions {
/// If this field is not set then it will be treated as kWarn unless
overridden
/// by the ACERO_ALIGNMENT_HANDLING environment variable
std::optional<UnalignedBufferHandling> unaligned_buffer_handling;
+
+ /// \brief An optional stop-token for the query. Defaults to unstoppable.
+ StopToken stop_token = StopToken::Unstoppable();
Review Comment:
What do you mean by user? If you mean end-user, then the end-user does not
need to change this, because it is set by higher-level APIs. If you mean
caller, then this options allows the caller to signal stopping via the
stop-token. Specifically, [a stop is requested on the
stop-source](https://github.com/apache/arrow/pull/35953/files#diff-70e843181eb977ed11ad131f79a0f54a0bf9e30a0cb752d440658ee0cc16cc34R962)
from which [this stop-token was
created](https://github.com/apache/arrow/pull/35953/files#diff-70e843181eb977ed11ad131f79a0f54a0bf9e30a0cb752d440658ee0cc16cc34R1005);
then, [the stop-token is passed to the
scheduler](https://github.com/apache/arrow/pull/35953/files#diff-70e843181eb977ed11ad131f79a0f54a0bf9e30a0cb752d440658ee0cc16cc34R194)
which will detect the signal via the stop-token.
This approach was suggested by @westonpace, so he may be able to say more
about why.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]