shangxinli commented on code in PR #1034:
URL: https://github.com/apache/iceberg-cpp/pull/1034#discussion_r4316572614
##########
src/iceberg/manifest/manifest_reader.cc:
##########
@@ -465,9 +491,9 @@ Status ParseDataFile(const std::shared_ptr<StructType>&
data_file_schema,
switch (field_id) {
case DataFile::kContentFieldId:
- ICEBERG_RETURN_UNEXPECTED(ParseIntegerField(field_view,
manifest_entries,
-
proj_data_file(&DataFile::content),
- field_name, required));
+ ICEBERG_RETURN_UNEXPECTED(
+ ParseEnumField(DataFileContentFromInt, field_view,
manifest_entries,
+ proj_data_file(&DataFile::content), field_name,
required));
Review Comment:
The file_format case just below has no else-if-required branch, so a null in
that required field silently keeps the default instead of returning
MakeNullError the way every other field in this switch does.
--
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]