@@ -519,8 +519,7 @@ Result<std::unique_ptr<PartitionField>> PartitionFieldFromJson(
519519 std::move (transform));
520520}
521521
522- Result<std::unique_ptr<PartitionSpec>> PartitionSpecFromJson (
523- const std::shared_ptr<Schema>& schema, const nlohmann::json& json) {
522+ Result<std::unique_ptr<PartitionSpec>> PartitionSpecFromJson (const nlohmann::json& json) {
524523 ICEBERG_ASSIGN_OR_RAISE (auto spec_id, GetJsonValue<int32_t >(json, kSpecId ));
525524 ICEBERG_ASSIGN_OR_RAISE (auto fields, GetJsonValue<nlohmann::json>(json, kFields ));
526525
@@ -529,7 +528,7 @@ Result<std::unique_ptr<PartitionSpec>> PartitionSpecFromJson(
529528 ICEBERG_ASSIGN_OR_RAISE (auto partition_field, PartitionFieldFromJson (field_json));
530529 partition_fields.push_back (std::move (*partition_field));
531530 }
532- return std::make_unique<PartitionSpec>(schema, spec_id, std::move (partition_fields));
531+ return std::make_unique<PartitionSpec>(spec_id, std::move (partition_fields));
533532}
534533
535534Result<std::unique_ptr<SnapshotRef>> SnapshotRefFromJson (const nlohmann::json& json) {
@@ -853,11 +852,9 @@ Result<std::shared_ptr<Schema>> ParseSchemas(
853852// /
854853// / \param[in] json The JSON object to parse.
855854// / \param[in] format_version The format version of the table.
856- // / \param[in] current_schema The current schema.
857855// / \param[out] default_spec_id The default partition spec ID.
858856// / \param[out] partition_specs The list of partition specs.
859857Status ParsePartitionSpecs (const nlohmann::json& json, int8_t format_version,
860- const std::shared_ptr<Schema>& current_schema,
861858 int32_t & default_spec_id,
862859 std::vector<std::shared_ptr<PartitionSpec>>& partition_specs) {
863860 if (json.contains (kPartitionSpecs )) {
@@ -870,8 +867,7 @@ Status ParsePartitionSpecs(const nlohmann::json& json, int8_t format_version,
870867 ICEBERG_ASSIGN_OR_RAISE (default_spec_id, GetJsonValue<int32_t >(json, kDefaultSpecId ));
871868
872869 for (const auto & spec_json : spec_array) {
873- ICEBERG_ASSIGN_OR_RAISE (auto spec,
874- PartitionSpecFromJson (current_schema, spec_json));
870+ ICEBERG_ASSIGN_OR_RAISE (auto spec, PartitionSpecFromJson (spec_json));
875871 partition_specs.push_back (std::move (spec));
876872 }
877873 } else {
@@ -902,8 +898,8 @@ Status ParsePartitionSpecs(const nlohmann::json& json, int8_t format_version,
902898 std::move (field->transform ()));
903899 }
904900
905- auto spec = std::make_unique<PartitionSpec>(
906- current_schema, PartitionSpec::kInitialSpecId , std::move (fields));
901+ auto spec =
902+ std::make_unique<PartitionSpec>( PartitionSpec::kInitialSpecId , std::move (fields));
907903 default_spec_id = spec->spec_id ();
908904 partition_specs.push_back (std::move (spec));
909905 }
@@ -977,9 +973,9 @@ Result<std::unique_ptr<TableMetadata>> TableMetadataFromJson(const nlohmann::jso
977973 ParseSchemas (json, table_metadata->format_version ,
978974 table_metadata->current_schema_id , table_metadata->schemas ));
979975
980- ICEBERG_RETURN_UNEXPECTED (ParsePartitionSpecs (
981- json, table_metadata->format_version , current_schema ,
982- table_metadata-> default_spec_id , table_metadata->partition_specs ));
976+ ICEBERG_RETURN_UNEXPECTED (ParsePartitionSpecs (json, table_metadata-> format_version ,
977+ table_metadata->default_spec_id ,
978+ table_metadata->partition_specs ));
983979
984980 if (json.contains (kLastPartitionId )) {
985981 ICEBERG_ASSIGN_OR_RAISE (table_metadata->last_partition_id ,
0 commit comments