File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,7 +145,8 @@ class ICEBERG_EXPORT Table : public std::enable_shared_from_this<Table> {
145145 std::unique_ptr<class TableMetadataCache > metadata_cache_;
146146};
147147
148- class ICEBERG_EXPORT StagedTable : public Table {
148+ // / \brief A table created by stage-create and not yet committed.
149+ class ICEBERG_EXPORT StagedTable final : public Table {
149150 public:
150151 static Result<std::shared_ptr<StagedTable>> Make (
151152 TableIdentifier identifier, std::shared_ptr<TableMetadata> metadata,
@@ -162,7 +163,9 @@ class ICEBERG_EXPORT StagedTable : public Table {
162163 using Table::Table;
163164};
164165
165- class ICEBERG_EXPORT StaticTable : public Table {
166+ // / \brief A read-only table.
167+
168+ class ICEBERG_EXPORT StaticTable final : public Table {
166169 public:
167170 static Result<std::shared_ptr<StaticTable>> Make (
168171 TableIdentifier identifier, std::shared_ptr<TableMetadata> metadata,
Original file line number Diff line number Diff line change @@ -419,13 +419,13 @@ class ICEBERG_EXPORT TableMetadataBuilder : public ErrorCollector {
419419 // / \return A Result containing the constructed TableMetadata or an error
420420 Result<std::unique_ptr<TableMetadata>> Build ();
421421
422- // / \brief Return the changes made to the table metadata
422+ // / \brief Returns the changes made to the table metadata
423423 const std::vector<std::unique_ptr<TableUpdate>>& changes () const ;
424424
425- // / \brief Return the base metadata without any changes
425+ // / \brief Returns the base metadata without any changes
426426 const TableMetadata* base () const ;
427427
428- // / \brief Return the current metadata with staged changes applied
428+ // / \brief Returns the current metadata with staged changes applied
429429 const TableMetadata* current () const ;
430430
431431 // / \brief Destructor
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ class ICEBERG_EXPORT Transaction : public std::enable_shared_from_this<Transacti
4343 // / \brief Return the Table that this transaction will update
4444 const std::shared_ptr<Table>& table () const { return table_; }
4545
46- // / \brief Return the base metadata without any changes
46+ // / \brief Returns the base metadata without any changes
4747 const TableMetadata* base () const ;
4848
4949 // / \brief Return the current metadata with staged changes applied
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ UpdateProperties& UpdateProperties::Remove(const std::string& key) {
7878Result<PendingUpdate::ApplyResult> UpdateProperties::Apply () {
7979 ICEBERG_RETURN_UNEXPECTED (CheckErrors ());
8080
81- const auto * base_metadata = transaction_->base ();
81+ const auto * base_metadata = transaction_->current ();
8282 if (!base_metadata) {
8383 return InvalidArgument (" Base table metadata is required to apply property updates" );
8484 }
@@ -112,8 +112,7 @@ Result<PendingUpdate::ApplyResult> UpdateProperties::Apply() {
112112
113113 ApplyResult result;
114114 if (!updates_.empty ()) {
115- result.updates .emplace_back (
116- std::make_unique<table::SetProperties>(std::move (updates_)));
115+ result.updates .emplace_back (std::make_unique<table::SetProperties>(updates_));
117116 }
118117 if (!removals_.empty ()) {
119118 result.updates .emplace_back (std::make_unique<table::RemoveProperties>(
You can’t perform that action at this time.
0 commit comments