Skip to content

Commit 5a46de2

Browse files
committed
fix: merge latest code from main
1 parent 350e5eb commit 5a46de2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/iceberg/json_internal.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ Result<std::unique_ptr<PartitionField>> PartitionFieldFromJson(
401401
ICEBERG_ASSIGN_OR_RAISE(auto field_id, GetJsonValue<int32_t>(json, kFieldId));
402402
ICEBERG_ASSIGN_OR_RAISE(
403403
auto transform,
404-
GetJsonValue<std::string>(json, kTransform).and_then(TransformFunctionFromString));
404+
GetJsonValue<std::string>(json, kTransform).and_then(TransformFromString));
405405
ICEBERG_ASSIGN_OR_RAISE(auto name, GetJsonValue<std::string>(json, kName));
406406
return std::make_unique<PartitionField>(source_id, field_id, name,
407407
std::move(transform));

test/json_internal_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ TEST(JsonInternalTest, SortOrder) {
102102
}
103103

104104
TEST(JsonInternalTest, PartitionField) {
105-
auto identity_transform = std::make_shared<IdentityTransformFunction>();
105+
auto identity_transform = Transform::Identity();
106106
PartitionField field(3, 101, "region", identity_transform);
107107
nlohmann::json expected_json =
108108
R"({"source-id":3,"field-id":101,"transform":"identity","name":"region"})"_json;
@@ -125,7 +125,7 @@ TEST(JsonPartitionTest, PartitionSpec) {
125125
SchemaField(3, "region", std::make_shared<StringType>(), false),
126126
SchemaField(5, "ts", std::make_shared<LongType>(), false)});
127127

128-
auto identity_transform = std::make_shared<IdentityTransformFunction>();
128+
auto identity_transform = Transform::Identity();
129129
PartitionSpec spec(schema, 1,
130130
{PartitionField(3, 101, "region", identity_transform),
131131
PartitionField(5, 102, "ts", identity_transform)});

0 commit comments

Comments
 (0)