AlenkaF commented on code in PR #13311:
URL: https://github.com/apache/arrow/pull/13311#discussion_r913770195
##########
python/pyarrow/src_arrow/flight.cc:
##########
@@ -371,24 +370,21 @@ Status CreateFlightInfo(const
std::shared_ptr<arrow::Schema>& schema,
const std::vector<arrow::flight::FlightEndpoint>&
endpoints,
int64_t total_records, int64_t total_bytes,
std::unique_ptr<arrow::flight::FlightInfo>* out) {
- arrow::flight::FlightInfo::Data flight_data;
- RETURN_NOT_OK(arrow::flight::internal::SchemaToString(*schema,
&flight_data.schema));
- flight_data.descriptor = descriptor;
- flight_data.endpoints = endpoints;
- flight_data.total_records = total_records;
- flight_data.total_bytes = total_bytes;
- arrow::flight::FlightInfo value(flight_data);
- *out = std::unique_ptr<arrow::flight::FlightInfo>(new
arrow::flight::FlightInfo(value));
+ auto result =
+ arrow::flight::FlightInfo::Make(*schema,
+ descriptor,
+ endpoints,
+ total_records,
+ total_bytes);
+ *out = std::unique_ptr<arrow::flight::FlightInfo>(&(*result));
Review Comment:
Oh, haven't tried that one. Awesome, thank you very very much =)
--
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]