In this case, there are plain C++ classes written for each of the Protobuf classes [1]. The Protobuf classes are always used qualified.
We don't expose Protobuf in the public API, so these 'duplicate' classes are necessary. [1]: https://github.com/apache/arrow/blob/29553fd679ec3c114ae6e1eef8e279e55ce55a18/cpp/src/arrow/flight/sql/server.h#L191-L194 On Thu, Feb 23, 2023, at 16:10, Paul Nienaber (CW) wrote: > Hi, > > We're working on an extension to part of the Arrow protocol, and running > into very unexpected (and so far very hard to diagnose) build issues > relating to how Protobuf generated classes are exposed. > > For example the existing code (arrow/flight/sql/server.cc) uses some of the > Protobuf types unqualified (no namespace etc.): > > arrow::Result<ActionCancelQueryRequest> ParseActionCancelQueryRequest( > > However newly-added Protobuf message types used in the same manner result > in the compiler (clang/MacOS) suggesting using the namespace-qualified name > which is obviously not the convention: > > Proto: > message ActionCloseSessionRequest { > option (experimental) = true; > } > > arrow/flight/sql/server.cc: > arrow::Result<ActionCloseSessionRequest> ParseActionCloseSessionRequest( > > -> > > [...]/git/arrow/cpp/src/arrow/flight/sql/server.cc:274:15: error: unknown > type name 'ActionCloseSessionRequest'; did you mean > 'protocol::sql::ActionCloseSessionRequest'? > > Is there some Protobuf or preprocessor/build system magic going on that I'm > missing that is obscuring anything other than whitelisted symbols (e.g. > ParseActionCancelQueryRequest being visible)? > > Cheers > Paul