You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "shruti2522 (via GitHub)" <gi...@apache.org> on 2025/03/04 03:36:07 UTC
[PR] doc: update comment for spawn_blocking [datafusion]
shruti2522 opened a new pull request, #14995:
URL: https://github.com/apache/datafusion/pull/14995
## Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
-->
- Closes #9152.
## Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
## What changes are included in this PR?
update documentation for `RecordBatchReceiverStreamBuilder::spawn_blocking`
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
## Are these changes tested?
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
-->
## Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->
<!--
If there are any breaking changes to public APIs, please add the `api change` label.
-->
--
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-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] doc: update RecordBatchReceiverStreamBuilder::spawn_blocking task behaviour [datafusion]
Posted by "berkaysynnada (via GitHub)" <gi...@apache.org>.
berkaysynnada commented on code in PR #14995:
URL: https://github.com/apache/datafusion/pull/14995#discussion_r1982218157
##########
datafusion/physical-plan/src/stream.rs:
##########
@@ -241,8 +241,17 @@ impl RecordBatchReceiverStreamBuilder {
self.inner.spawn(task)
}
- /// Spawn a blocking task that will be aborted if this builder (or the stream
- /// built from it) are dropped
+ /// Spawns a blocking task that attempts to send `RecordBatch` data to this stream.
Review Comment:
Current usages can be limited with this use case, but if we look at the signature, this util is not limited with that case only. Perhaps we can generalize this more?
--
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-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] doc: update RecordBatchReceiverStreamBuilder::spawn_blocking task behaviour [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #14995:
URL: https://github.com/apache/datafusion/pull/14995
--
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-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] doc: update RecordBatchReceiverStreamBuilder::spawn_blocking task behaviour [datafusion]
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on code in PR #14995:
URL: https://github.com/apache/datafusion/pull/14995#discussion_r1985710577
##########
datafusion/physical-plan/src/stream.rs:
##########
@@ -241,8 +245,21 @@ impl RecordBatchReceiverStreamBuilder {
self.inner.spawn(task)
}
- /// Spawn a blocking task that will be aborted if this builder (or the stream
- /// built from it) are dropped
+ /// Spawn a blocking task tied to the builder and stream.
+ ///
+ /// # Drop / Cancel Behavior
+ ///
+ /// If this builder (or the stream built from it) is dropped **before** the
+ /// task starts, the task is also dropped and will never start execute.
Review Comment:
👍
--
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-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] doc: update RecordBatchReceiverStreamBuilder::spawn_blocking task behaviour [datafusion]
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on code in PR #14995:
URL: https://github.com/apache/datafusion/pull/14995#discussion_r1980248722
##########
datafusion/physical-plan/src/stream.rs:
##########
@@ -241,8 +241,17 @@ impl RecordBatchReceiverStreamBuilder {
self.inner.spawn(task)
}
- /// Spawn a blocking task that will be aborted if this builder (or the stream
- /// built from it) are dropped
+ /// Spawns a blocking task that attempts to send `RecordBatch` data to this stream.
+ ///
+ /// If this builder (or the stream built from it) is dropped **before** the task starts,
Review Comment:
I think here can be some confusion. Task will never executes does that mean the task ignored or it is stuck in waiting queue forever?
--
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-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] doc: update RecordBatchReceiverStreamBuilder::spawn_blocking task behaviour [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #14995:
URL: https://github.com/apache/datafusion/pull/14995#discussion_r1985681214
##########
datafusion/physical-plan/src/stream.rs:
##########
@@ -241,8 +241,17 @@ impl RecordBatchReceiverStreamBuilder {
self.inner.spawn(task)
}
- /// Spawn a blocking task that will be aborted if this builder (or the stream
- /// built from it) are dropped
+ /// Spawns a blocking task that attempts to send `RecordBatch` data to this stream.
Review Comment:
Maybe we can restore the original description as I think that was more accurate
--
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-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] doc: update RecordBatchReceiverStreamBuilder::spawn_blocking task behaviour [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #14995:
URL: https://github.com/apache/datafusion/pull/14995#discussion_r1985683158
##########
datafusion/physical-plan/src/stream.rs:
##########
@@ -241,8 +241,17 @@ impl RecordBatchReceiverStreamBuilder {
self.inner.spawn(task)
}
- /// Spawn a blocking task that will be aborted if this builder (or the stream
- /// built from it) are dropped
+ /// Spawns a blocking task that attempts to send `RecordBatch` data to this stream.
+ ///
+ /// If this builder (or the stream built from it) is dropped **before** the task starts,
Review Comment:
I think "task will never execute" means it is droped and never runs.
--
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-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] doc: update RecordBatchReceiverStreamBuilder::spawn_blocking task behaviour [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #14995:
URL: https://github.com/apache/datafusion/pull/14995#issuecomment-2708164015
Thanks again @shruti2522 and @comphead
--
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-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org