Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/iceberg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ set(ICEBERG_SOURCES
type.cc
update/expire_snapshots.cc
update/fast_append.cc
update/merge_append.cc
update/merging_snapshot_update.cc
update/pending_update.cc
update/set_snapshot.cc
Expand Down
1 change: 1 addition & 0 deletions src/iceberg/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ iceberg_sources = files(
'type.cc',
'update/expire_snapshots.cc',
'update/fast_append.cc',
'update/merge_append.cc',
'update/merging_snapshot_update.cc',
'update/pending_update.cc',
'update/set_snapshot.cc',
Expand Down
7 changes: 7 additions & 0 deletions src/iceberg/table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "iceberg/transaction.h"
#include "iceberg/update/expire_snapshots.h"
#include "iceberg/update/fast_append.h"
#include "iceberg/update/merge_append.h"
#include "iceberg/update/set_snapshot.h"
#include "iceberg/update/snapshot_manager.h"
#include "iceberg/update/update_location.h"
Expand Down Expand Up @@ -217,6 +218,12 @@ Result<std::shared_ptr<FastAppend>> Table::NewFastAppend() {
return FastAppend::Make(name().name, std::move(ctx));
}

Result<std::shared_ptr<MergeAppend>> Table::NewMergeAppend() {
ICEBERG_ASSIGN_OR_RAISE(
auto ctx, TransactionContext::Make(shared_from_this(), TransactionKind::kUpdate));
return MergeAppend::Make(name().name, std::move(ctx));
}

Result<std::shared_ptr<UpdateStatistics>> Table::NewUpdateStatistics() {
ICEBERG_ASSIGN_OR_RAISE(
auto ctx, TransactionContext::Make(shared_from_this(), TransactionKind::kUpdate));
Expand Down
3 changes: 3 additions & 0 deletions src/iceberg/table.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ class ICEBERG_EXPORT Table : public std::enable_shared_from_this<Table> {
/// \brief Create a new FastAppend to append data files and commit the changes.
virtual Result<std::shared_ptr<FastAppend>> NewFastAppend();

/// \brief Create a new MergeAppend to append data files and merge manifests.
virtual Result<std::shared_ptr<MergeAppend>> NewMergeAppend();

/// \brief Create a new SnapshotManager to manage snapshots and snapshot references.
virtual Result<std::shared_ptr<SnapshotManager>> NewSnapshotManager();

Expand Down
1 change: 1 addition & 0 deletions src/iceberg/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ if(ICEBERG_BUILD_BUNDLE)
expire_snapshots_test.cc
fast_append_test.cc
manifest_filter_manager_test.cc
merge_append_test.cc
merging_snapshot_update_test.cc
name_mapping_update_test.cc
snapshot_manager_test.cc
Expand Down
Loading
Loading