Hi David,

Thanks for the clarification.  I agree about not exposing Protobuf in
the public API.  But it's a pity it forces us to such manual data
wrangling...

Regards

Antoine.


Le 03/04/2019 à 17:12, David Li a écrit :
> 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.
>>
>>
>>

Reply via email to