erratic-pattern commented on code in PR #5433:
URL: https://github.com/apache/arrow-rs/pull/5433#discussion_r1511417517
##########
arrow-flight/examples/flight_sql_server.rs:
##########
@@ -617,7 +618,7 @@ impl FlightSqlService for FlightSqlServiceImpl {
&self,
_query: CommandPreparedStatementQuery,
_request: Request<PeekableFlightDataStream>,
- ) -> Result<Response<<Self as FlightService>::DoPutStream>, Status> {
+ ) -> Result<Option<DoPutPreparedStatementResult>, Status> {
Review Comment:
But yes to answer your question, the result is potentially missing due to
legacy behavior and the types here indicate that directly. This is because the
inner handle was originally specified to be *mandatory* if the result is
provided. I've updated the protobuf in the spec PR (apache/arrow#40243) to make
the handle field itself `optional`.
So with that protobuf change, what we could do is make the inner handle
field an `Option` and use a `Default` implementation on
`DoPutPreparedStatementResult` to handle the case where it's missing,
--
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]