You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by fo...@apache.org on 2025/06/29 05:13:19 UTC

(iceberg-cpp) branch main updated: fix: no member named 'SourceFieldIndex' (#131)

This is an automated email from the ASF dual-hosted git repository.

fokko pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-cpp.git


The following commit(s) were added to refs/heads/main by this push:
     new c00ee8f  fix: no member named 'SourceFieldIndex' (#131)
c00ee8f is described below

commit c00ee8f91ddc35c0b0bd08e2832203afa9535c6b
Author: Junwang Zhao <zh...@gmail.com>
AuthorDate: Sun Jun 29 13:13:14 2025 +0800

    fix: no member named 'SourceFieldIndex' (#131)
---
 src/iceberg/avro/avro_data_util.cc   | 3 +--
 src/iceberg/avro/avro_schema_util.cc | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/iceberg/avro/avro_data_util.cc b/src/iceberg/avro/avro_data_util.cc
index b087bab..e3b4b06 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<int>(i));
 
     if (field_projection.kind == FieldProjection::Kind::kProjected) {
-      size_t avro_field_index =
-          std::get<FieldProjection::SourceFieldIndex>(field_projection.from);
+      size_t avro_field_index = std::get<size_t>(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 0eaf5ac..905d980 100644
--- a/src/iceberg/avro/avro_schema_util.cc
+++ b/src/iceberg/avro/avro_schema_util.cc
@@ -672,7 +672,7 @@ Result<FieldProjection> 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));