Skip to content

Commit

Permalink
Merge pull request redpanda-data#23957 from mmaslankaprv/fix-manifest…
Browse files Browse the repository at this point in the history
…-entry-value

iceberg/manifest_entry: fixed manifest entry avro serialization
  • Loading branch information
mmaslankaprv authored Oct 30, 2024
2 parents 8211880 + f7fed79 commit 29c5d6b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
6 changes: 0 additions & 6 deletions src/v/iceberg/manifest_entry_type.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ struct_type data_file_type(partition_key_type partition_type) {
field_required::no,
map_type::create(
121, int_type(), 122, field_required::yes, long_type())));
r2_type.fields.emplace_back(nested_field::create(
111,
"distinct_counts",
field_required::no,
map_type::create(
123, int_type(), 124, field_required::yes, long_type())));
r2_type.fields.emplace_back(nested_field::create(
137,
"nan_value_counts",
Expand Down
11 changes: 10 additions & 1 deletion src/v/iceberg/manifest_entry_values.cc
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,25 @@ std::unique_ptr<struct_value> data_file_to_value(const data_file& file) {
long_value(static_cast<int64_t>(file.file_size_bytes)));

// TODO: serialize the rest of the optional fields.
// column_sizes
ret->fields.emplace_back(std::nullopt);
// value_counts
ret->fields.emplace_back(std::nullopt);
// null_value_counts
ret->fields.emplace_back(std::nullopt);
// nan_value_counts
ret->fields.emplace_back(std::nullopt);
// lower_bounds
ret->fields.emplace_back(std::nullopt);
// upper_bounds
ret->fields.emplace_back(std::nullopt);
// key_metadata
ret->fields.emplace_back(std::nullopt);
// split_offsets
ret->fields.emplace_back(std::nullopt);
// equality_ids
ret->fields.emplace_back(std::nullopt);
ret->fields.emplace_back(std::nullopt);
// sort_order_id
ret->fields.emplace_back(std::nullopt);
return ret;
}
Expand Down

0 comments on commit 29c5d6b

Please sign in to comment.