8000 fix: bump avro version to enable uuid type test case by wgtmac · Pull Request #103 · apache/iceberg-cpp · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake_modules/IcebergThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function(resolve_avro_dependency)
${FC_DECLARE_COMMON_OPTIONS}
# TODO: switch to Apache Avro 1.13.0 once released.
GIT_REPOSITORY https://github.com/apache/avro.git
GIT_TAG 1305509ace25931b3373d35daf47bc48238455b6
GIT_TAG 82a2bc8b034de34626e2ab8bf091234122474d50
SOURCE_SUBDIR
lang/c++
FIND_PACKAGE_ARGS
Expand Down
6 changes: 3 additions & 3 deletions
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ Status ToAvroNodeVisitor::Visit(const StringType& type, ::avro::NodePtr* node) {
}

Status ToAvroNodeVisitor::Visit(const UuidType& type, ::avro::NodePtr* node) {
*node = std::make_shared<::avro::NodePrimitive>(::avro::AVRO_FIXED);
(*node)->setLogicalType(::avro::LogicalType{::avro::LogicalType::UUID});
(*node)->setFixedSize(16);
*node = std::make_shared<::avro::NodeFixed>();
(*node)->setName(::avro::Name("uuid_fixed"));
(*node)->setFixedSize(16);
(*node)->setLogicalType(::avro::LogicalType{::avro::LogicalType::UUID});
return {};
}

Expand Down
3 changes: 1 addition & 2 deletions test/avro_schema_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ TEST(ToAvroNodeVisitorTest, StringType) {
EXPECT_EQ(node->type(), ::avro::AVRO_STRING);
}

// FIXME: https://issues.apache.org/jira/browse/AVRO-4140
TEST(ToAvroNodeVisitorTest, DISABLED_UuidType) {
TEST(ToAvroNodeVisitorTest, UuidType) {
::avro::NodePtr node;
EXPECT_THAT(ToAvroNodeVisitor{}.Visit(UuidType{}, &node), IsOk());
EXPECT_EQ(node->type(), ::avro::AVRO_FIXED);
Expand Down
Loading
0