Skip to content

spark is unable to read the manifest file, likely due to an incorrect root node name in the schema. #306

@rip-nsk

Description

@rip-nsk

the following change resolves the issue

diff --git a/src/iceberg/avro/avro_schema_util.cc b/src/iceberg/avro/avro_schema_util.cc
index d315eb2..596f0c8 100644
--- a/src/iceberg/avro/avro_schema_util.cc
+++ b/src/iceberg/avro/avro_schema_util.cc
@@ -225,7 +225,7 @@ Status ToAvroNodeVisitor::Visit(const StructType& type, ::avro::NodePtr* node) {
   *node = std::make_shared<::avro::NodeRecord>();
 
   if (field_ids_.empty()) {
-    (*node)->setName(::avro::Name("iceberg_schema"));  // Root node
+    (*node)->setName(::avro::Name("manifest_file"));  // Root node
   } else {
     (*node)->setName(::avro::Name(std::format("r{}", field_ids_.top())));
   }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions