manuzhang commented on code in PR #1162:
URL: https://github.com/apache/iceberg-cpp/pull/1162#discussion_r4681464983
##########
src/iceberg/json_serde.cc:
##########
@@ -1594,13 +1594,12 @@ Result<std::unique_ptr<TableMetadata>>
TableMetadataFromJson(const nlohmann::jso
auto table_metadata = std::make_unique<TableMetadata>();
- ICEBERG_ASSIGN_OR_RAISE(table_metadata->format_version,
- GetJsonValue<int8_t>(json, kFormatVersion));
- if (table_metadata->format_version < 1 ||
- table_metadata->format_version >
TableMetadata::kSupportedTableFormatVersion) {
- return JsonParseError("Cannot read unsupported version: {}",
- table_metadata->format_version);
+ ICEBERG_ASSIGN_OR_RAISE(auto format_version,
+ GetJsonInteger<int32_t>(json, kFormatVersion));
Review Comment:
In a second thought, I think it would be better to use consistently use
`int8_t`.
--
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]