From b2e5bb6dd660c02de88dc0e41a65ffad1ee651c9 Mon Sep 17 00:00:00 2001 From: Feiyang Li Date: Thu, 29 Jan 2026 18:05:26 +0800 Subject: [PATCH] test: Register Avro logical types to support non-string key maps --- src/iceberg/test/avro_schema_test.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/iceberg/test/avro_schema_test.cc b/src/iceberg/test/avro_schema_test.cc index 8fcc95675..2c1ee8a96 100644 --- a/src/iceberg/test/avro_schema_test.cc +++ b/src/iceberg/test/avro_schema_test.cc @@ -24,6 +24,7 @@ #include #include +#include "iceberg/avro/avro_register.h" #include "iceberg/avro/avro_schema_util_internal.h" #include "iceberg/metadata_columns.h" #include "iceberg/name_mapping.h" @@ -605,6 +606,7 @@ TEST(HasIdVisitorTest, ComplexNestedSchema) { } TEST(HasIdVisitorTest, ArrayBackedMapWithIds) { + ::iceberg::avro::RegisterLogicalTypes(); const std::string schema_json = R"({ "type": "array", "items": { @@ -1022,6 +1024,8 @@ TEST(AvroSchemaProjectionTest, ProjectMapType) { } TEST(AvroSchemaProjectionTest, ProjectMapTypeWithNonStringKey) { + ::iceberg::avro::RegisterLogicalTypes(); + // Create iceberg schema with an int->string map Schema expected_schema({ SchemaField::MakeOptional(