Skip to content

Commit abe874a

Browse files
committed
address feedback
1 parent b3e0815 commit abe874a

4 files changed

Lines changed: 11 additions & 9 deletions

File tree

src/iceberg/table.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff 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,

src/iceberg/table_metadata.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

src/iceberg/transaction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

src/iceberg/update/update_properties.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ UpdateProperties& UpdateProperties::Remove(const std::string& key) {
7878
Result<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>(

0 commit comments

Comments
 (0)