You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "opensourcegeek (via GitHub)" <gi...@apache.org> on 2024/04/27 16:20:00 UTC
[PR] Fallible stream for arrow-flight do_exchange call (#3462) [arrow-rs]
opensourcegeek opened a new pull request, #5698:
URL: https://github.com/apache/arrow-rs/pull/5698
# 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 #3462
# 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?
<!--
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 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 `breaking 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@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fallible stream for arrow-flight do_exchange call (#3462) [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #5698:
URL: https://github.com/apache/arrow-rs/pull/5698#discussion_r1584754390
##########
arrow-flight/src/client.rs:
##########
@@ -431,20 +429,40 @@ impl FlightClient {
/// .expect("error calling do_exchange");
/// # }
/// ```
- pub async fn do_exchange<S: Stream<Item = FlightData> + Send + 'static>(
+ pub async fn do_exchange<S: Stream<Item = Result<FlightData>> + Send + 'static>(
&mut self,
request: S,
) -> Result<FlightRecordBatchStream> {
- let request = self.make_request(request);
+ let (sender, mut receiver) = futures::channel::oneshot::channel();
Review Comment:
I wonder if there is some way to avoid the repetition here with the code in `do_get` above 🤔
--
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@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fallible stream for arrow-flight do_exchange call (#3462) [arrow-rs]
Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold merged PR #5698:
URL: https://github.com/apache/arrow-rs/pull/5698
--
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@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fallible stream for arrow-flight do_exchange call (#3462) [arrow-rs]
Posted by "opensourcegeek (via GitHub)" <gi...@apache.org>.
opensourcegeek commented on code in PR #5698:
URL: https://github.com/apache/arrow-rs/pull/5698#discussion_r1584803221
##########
arrow-flight/src/client.rs:
##########
@@ -431,20 +429,40 @@ impl FlightClient {
/// .expect("error calling do_exchange");
/// # }
/// ```
- pub async fn do_exchange<S: Stream<Item = FlightData> + Send + 'static>(
+ pub async fn do_exchange<S: Stream<Item = Result<FlightData>> + Send + 'static>(
&mut self,
request: S,
) -> Result<FlightRecordBatchStream> {
- let request = self.make_request(request);
+ let (sender, mut receiver) = futures::channel::oneshot::channel();
Review Comment:
I did wonder about duplication of the code as in `do_put` method, making all errors (both in request stream and response stream) go back to client. Since it's my first MR here I didn't want to take it further. But happy to explore.
--
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@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fallible stream for arrow-flight do_exchange call (#3462) [arrow-rs]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #5698:
URL: https://github.com/apache/arrow-rs/pull/5698#discussion_r1584851068
##########
arrow-flight/src/client.rs:
##########
@@ -431,20 +429,40 @@ impl FlightClient {
/// .expect("error calling do_exchange");
/// # }
/// ```
- pub async fn do_exchange<S: Stream<Item = FlightData> + Send + 'static>(
+ pub async fn do_exchange<S: Stream<Item = Result<FlightData>> + Send + 'static>(
&mut self,
request: S,
) -> Result<FlightRecordBatchStream> {
- let request = self.make_request(request);
+ let (sender, mut receiver) = futures::channel::oneshot::channel();
Review Comment:
Maybe we could do it as a follow on PR 🤔
I think this PR is ready to merge as long as we can accept API changes in this release (we are working to slow down the rate of breaking API changes - see #5368 )
--
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@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org