Hi Antoine, The ToProto/FromProto methods convert between Protobuf structs and Flight-specific structs. They aren't actually parsing or serializing anything. While you could argue for just using the Protobuf structs directly, I there are a few reasons not to:
- We don't want to expose Protobuf in the public APIs, and - Google's official guidance recommends against using Protobuf structs to actually model application data [1] (and while they claim Protobuf structs are basically "dumb data structs", they're quite far from that, with lots of generated methods [2]) [1]: https://developers.google.com/protocol-buffers/docs/cpptutorial#parsing-and-serialization [2]: https://developers.google.com/protocol-buffers/docs/reference/cpp-generated Best, David On 4/3/19, Antoine Pitrou <solip...@pitrou.net> wrote: > > Hello, > > Why do we have parsing / unparsing implementations in > src/arrow/flight/internal.cc? > > I assumed gRPC / protobuf would give this to us for free. Instead it > seems we have to write it ourselves? > > Regards > > Antoine. > > >