westonpace commented on code in PR #12852:
URL: https://github.com/apache/arrow/pull/12852#discussion_r856373437
##########
cpp/src/arrow/engine/substrait/extension_set.h:
##########
@@ -226,14 +246,10 @@ class ARROW_ENGINE_EXPORT ExtensionSet {
private:
ExtensionIdRegistry* registry_;
/// The subset of extension registry URIs referenced by this extension set
- std::vector<util::string_view> uris_;
+ std::unordered_map<uint32_t, util::string_view> uris_;
std::vector<TypeRecord> types_;
-
std::vector<FunctionRecord> functions_;
-
- // pimpl pattern to hide lookup details
- struct Impl;
- std::unique_ptr<Impl, void (*)(Impl*)> impl_;
+ std::unordered_map<Id, uint32_t, IdHashEq, IdHashEq> types_map_,
functions_map_;
Review Comment:
Do we have a guideline for hiding. I find it hard to know when details are
"too messy" and deserve a pimpl (other than mutex which we have lint checks
for).
Given that users of this header are going to have to dealing with `Id`
(`ExtensionIdRegistry` exposes the idea) the `IdHashEq` could be considered
useful.
--
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]