mapleFU commented on code in PR #180:
URL: https://github.com/apache/iceberg-cpp/pull/180#discussion_r2302928081


##########
src/iceberg/schema.cc:
##########
@@ -44,4 +87,181 @@ bool Schema::Equals(const Schema& other) const {
   return schema_id_ == other.schema_id_ && fields_ == other.fields_;
 }
 
+Result<std::optional<std::reference_wrapper<const SchemaField>>> 
Schema::FindFieldByName(
+    std::string_view name, bool case_sensitive) const {
+  if (case_sensitive) {
+    ICEBERG_RETURN_UNEXPECTED(InitNameToIdMap());
+    auto it = name_to_id_.find(std::string(name));

Review Comment:
   https://en.cppreference.com/w/cpp/container/unordered_map/find
   
   The hash is not transparent, heterogeneous lookup is able to searching here



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to