diff --git a/src/iceberg/avro/avro_data_util.cc b/src/iceberg/avro/avro_data_util.cc index b087bab2..e3b4b063 100644 --- a/src/iceberg/avro/avro_data_util.cc +++ b/src/iceberg/avro/avro_data_util.cc @@ -70,8 +70,7 @@ Status AppendStructToBuilder(const ::avro::NodePtr& avro_node, auto* field_builder = struct_builder->field_builder(static_cast(i)); if (field_projection.kind == FieldProjection::Kind::kProjected) { - size_t avro_field_index = - std::get(field_projection.from); + size_t avro_field_index = std::get(field_projection.from); if (avro_field_index >= avro_record.fieldCount()) { return InvalidArgument("Avro field index {} out of bound {}", avro_field_index, avro_record.fieldCount()); diff --git a/src/iceberg/avro/avro_schema_util.cc b/src/iceberg/avro/avro_schema_util.cc index 0eaf5acc..905d9802 100644 --- a/src/iceberg/avro/avro_schema_util.cc +++ b/src/iceberg/avro/avro_schema_util.cc @@ -672,7 +672,7 @@ Result ProjectList(const ListType& list_type, // Set the element projection metadata but preserve its children element_projection.kind = FieldProjection::Kind::kProjected; - element_projection.from = FieldProjection::SourceFieldIndex{0}; + element_projection.from = size_t{0}; FieldProjection result; result.children.emplace_back(std::move(element_projection));