zhjwpku commented on code in PR #186:
URL: https://github.com/apache/iceberg-cpp/pull/186#discussion_r2294108324


##########
src/iceberg/schema_internal.cc:
##########
@@ -192,7 +193,11 @@ int32_t GetFieldId(const ArrowSchema& schema) {
     return kUnknownFieldId;
   }
 
-  return std::stoi(std::string(field_id_value.data, 
field_id_value.size_bytes));
+  int32_t field_id = kUnknownFieldId;
+  std::from_chars(field_id_value.data, field_id_value.data + 
field_id_value.size_bytes,

Review Comment:
   If ec is std::errc(), the field_id is still kUnknownFieldId, this check is 
unnecessary.



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