You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alexwilcoxson-rel (via GitHub)" <gi...@apache.org> on 2023/03/13 21:36:04 UTC

[GitHub] [arrow-rs] alexwilcoxson-rel opened a new issue, #3855: Enable setting FlightDescriptor on FlightDataEncoderBuilder

alexwilcoxson-rel opened a new issue, #3855:
URL: https://github.com/apache/arrow-rs/issues/3855

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   When using FlightDataEncoder to send arrow batches to a flight do_put endpoint, FlightDescriptor cannot easily be set on first message. https://arrow.apache.org/docs/format/Flight.html#uploading-data
   
   **Describe the solution you'd like**
   On FlightDataEncoderBuilder a `with_flight_descriptor` method would be nice. The FlightDescriptor would then be set on the first FlightData retrieved from the encoder.
   
   **Describe alternatives you've considered**
   Here is a workaround, I may be missing something simpler
   ```rust
   let mut encoder = FlightDataEncoderBuilder::new()
       .with_schema(schema.clone())
       .build(stream);
   
   let mut first_flight_data = encoder
       .next()
       .await
       .expect("no flight data")
       .expect("flight data was error");
   first_flight_data.flight_descriptor = Some(FlightDescriptor {
       r#type: DescriptorType::Path.into(),
       path: vec!["table_name".to_string()],
       cmd: Bytes::default(),
   });
   let put_stream = stream::once(async { Ok(first_flight_data) }).chain(encoder);
   ```


-- 
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.apache.org

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


[GitHub] [arrow-rs] alamb closed issue #3855: Enable setting FlightDescriptor on FlightDataEncoderBuilder

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #3855: Enable setting FlightDescriptor on FlightDataEncoderBuilder
URL: https://github.com/apache/arrow-rs/issues/3855


-- 
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


[GitHub] [arrow-rs] tustvold commented on issue #3855: Enable setting FlightDescriptor on FlightDataEncoderBuilder

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #3855:
URL: https://github.com/apache/arrow-rs/issues/3855#issuecomment-1536259083

   `label_issue.py` automatically added labels {'arrow'} from #4101


-- 
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


[GitHub] [arrow-rs] alamb commented on issue #3855: Enable setting FlightDescriptor on FlightDataEncoderBuilder

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #3855:
URL: https://github.com/apache/arrow-rs/issues/3855#issuecomment-1471642249

   Thanks for the suggestion @alexwilcoxson-rel  -- I agree this sounds like a nice addition to the API. 
   
   Given the request is well specified and the code is fairly easy to test, I think this would be a good first issue for someone to work on if they wanted, so marking it thusly


-- 
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