File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -933,7 +933,9 @@ TableMetadataBuilder& TableMetadataBuilder::SetCurrentSchema(int32_t schema_id)
933933TableMetadataBuilder& TableMetadataBuilder::AddSchema (
934934 std::shared_ptr<Schema> const & schema) {
935935 ICEBERG_BUILDER_ASSIGN_OR_RETURN (auto highest_field_id, schema->HighestFieldId ());
936- impl_->AddSchema (*schema, std::max (impl_->metadata ().last_column_id , highest_field_id));
936+ auto new_last_column_id = std::max (impl_->metadata ().last_column_id , highest_field_id);
937+ ICEBERG_BUILDER_ASSIGN_OR_RETURN (auto schema_id,
938+ impl_->AddSchema (*schema, new_last_column_id));
937939 return *this ;
938940}
939941
Original file line number Diff line number Diff line change 3333#include " iceberg/result.h"
3434#include " iceberg/schema.h"
3535#include " iceberg/snapshot.h"
36+ #include " iceberg/sort_order.h"
3637#include " iceberg/table_metadata.h"
3738#include " iceberg/table_properties.h"
3839#include " iceberg/test/matchers.h"
@@ -75,6 +76,7 @@ class MetadataIOTest : public TempFileTestBase {
7576 .manifest_list = " s3://a/b/1.avro" ,
7677 .summary = {{" operation" , " append" }},
7778 })},
79+ .sort_orders = {SortOrder::Unsorted ()},
7880 .default_sort_order_id = 0 ,
7981 .next_row_id = 0 };
8082 }
You can’t perform that action at this time.
0 commit comments