Skip to content

Commit ea5cb69

Browse files
committed
fix: bump avro version to enable uuid type test case
1 parent 1c4c047 commit ea5cb69

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

cmake_modules/IcebergThirdpartyToolchain.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ function(resolve_avro_dependency)
181181
${FC_DECLARE_COMMON_OPTIONS}
182182
# TODO: switch to Apache Avro 1.13.0 once released.
183183
GIT_REPOSITORY https://github.com/apache/avro.git
184-
GIT_TAG 1305509ace25931b3373d35daf47bc48238455b6
184+
GIT_TAG 82a2bc8b034de34626e2ab8bf091234122474d50
185185
SOURCE_SUBDIR
186186
lang/c++
187187
FIND_PACKAGE_ARGS

src/iceberg/avro/avro_schema_util.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ Status ToAvroNodeVisitor::Visit(const StringType& type, ::avro::NodePtr* node) {
142142
}
143143

144144
Status ToAvroNodeVisitor::Visit(const UuidType& type, ::avro::NodePtr* node) {
145-
*node = std::make_shared<::avro::NodePrimitive>(::avro::AVRO_FIXED);
146-
(*node)->setLogicalType(::avro::LogicalType{::avro::LogicalType::UUID});
147-
(*node)->setFixedSize(16);
145+
*node = std::make_shared<::avro::NodeFixed>();
148146
(*node)->setName(::avro::Name("uuid_fixed"));
147+
(*node)->setFixedSize(16);
148+
(*node)->setLogicalType(::avro::LogicalType{::avro::LogicalType::UUID});
149149
return {};
150150
}
151151

test/avro_schema_test.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ TEST(ToAvroNodeVisitorTest, StringType) {
125125
EXPECT_EQ(node->type(), ::avro::AVRO_STRING);
126126
}
127127

128-
// FIXME: https://issues.apache.org/jira/browse/AVRO-4140
129-
TEST(ToAvroNodeVisitorTest, DISABLED_UuidType) {
128+
TEST(ToAvroNodeVisitorTest, UuidType) {
130129
::avro::NodePtr node;
131130
EXPECT_THAT(ToAvroNodeVisitor{}.Visit(UuidType{}, &node), IsOk());
132131
EXPECT_EQ(node->type(), ::avro::AVRO_FIXED);

0 commit comments

Comments
 (0)