wgtmac commented on code in PR #845:
URL: https://github.com/apache/iceberg-cpp/pull/845#discussion_r3920287537
##########
src/iceberg/schema_internal.cc:
##########
@@ -240,19 +239,22 @@ int32_t GetFieldId(const ArrowSchema& schema) {
return kUnknownFieldId;
}
- int32_t field_id = kUnknownFieldId;
- std::from_chars(field_id_value.data, field_id_value.data +
field_id_value.size_bytes,
- field_id);
+ std::string_view field_id(field_id_value.data, field_id_value.size_bytes);
+ auto field_id_result = StringUtils::ParseNumber<int32_t>(field_id);
+ if (!field_id_result.has_value()) {
+ return InvalidSchema(
+ "Invalid Arrow field ID: '{}'", field_id);
Review Comment:
```suggestion
return InvalidSchema("Invalid Arrow field ID: '{}'", field_id);
```
CI failed to due this unformatted line.
--
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]