matthewmturner commented on issue #5731:
URL: https://github.com/apache/arrow-rs/issues/5731#issuecomment-2116048108
Following up on this - I have reviewed the Flight and FlightSQL spec and
from what I can tell it is prescribed when `Any` should be used (ref
`ActionBeginTransactionResult`, `ActionBeginSavepointResult`, and a few others)
but I don't see this mentioned for `DoPut` and `PutResult`.
`DoPut` and `PutResult` definition.
```
/*
* Push a stream to the flight service associated with a particular
* flight stream. This allows a client of a flight service to upload a
stream
* of data. Depending on the particular flight service, a client consumer
* could be allowed to upload a single stream per descriptor or an
unlimited
* number. In the latter, the service might implement a 'seal' action that
* can be applied to a descriptor once all streams are uploaded.
*/
rpc DoPut(stream FlightData) returns (stream PutResult) {}
/**
* The response message associated with the submission of a DoPut.
*/
message PutResult {
bytes app_metadata = 1;
}
```
`ActionBeginTransactionResult` definition
```
/*
* The result of a "BeginTransaction" action.
*
* The transaction can be manipulated with the "EndTransaction" action, or
* automatically via server timeout. If the transaction times out, then it is
* automatically rolled back.
*
* The result should be wrapped in a google.protobuf.Any message.
*/
message ActionBeginTransactionResult {
option (experimental) = true;
// Opaque handle for the transaction on the server.
bytes transaction_id = 1;
}
```
Of course let me know if I am mistaken here but based on this my preference
would be to update the Rust implementation by removing the `Any` wrapper as I
believe it would be more in line with the spec. Separate from that, we could
then revisit whether in the spec `DoPut` results _should_ be wrapped in `Any`.
--
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]