|
33 | 33 | #include "iceberg/transaction.h" |
34 | 34 | #include "iceberg/update/expire_snapshots.h" |
35 | 35 | #include "iceberg/update/fast_append.h" |
| 36 | +#include "iceberg/update/merge_append.h" |
36 | 37 | #include "iceberg/update/set_snapshot.h" |
37 | 38 | #include "iceberg/update/snapshot_manager.h" |
38 | 39 | #include "iceberg/update/update_location.h" |
@@ -217,6 +218,12 @@ Result<std::shared_ptr<FastAppend>> Table::NewFastAppend() { |
217 | 218 | return FastAppend::Make(name().name, std::move(ctx)); |
218 | 219 | } |
219 | 220 |
|
| 221 | +Result<std::shared_ptr<MergeAppend>> Table::NewMergeAppend() { |
| 222 | + ICEBERG_ASSIGN_OR_RAISE( |
| 223 | + auto ctx, TransactionContext::Make(shared_from_this(), TransactionKind::kUpdate)); |
| 224 | + return MergeAppend::Make(name().name, std::move(ctx)); |
| 225 | +} |
| 226 | + |
220 | 227 | Result<std::shared_ptr<UpdateStatistics>> Table::NewUpdateStatistics() { |
221 | 228 | ICEBERG_ASSIGN_OR_RAISE( |
222 | 229 | auto ctx, TransactionContext::Make(shared_from_this(), TransactionKind::kUpdate)); |
@@ -316,6 +323,10 @@ Result<std::shared_ptr<FastAppend>> StaticTable::NewFastAppend() { |
316 | 323 | return NotSupported("Cannot create a fast append for a static table"); |
317 | 324 | } |
318 | 325 |
|
| 326 | +Result<std::shared_ptr<MergeAppend>> StaticTable::NewMergeAppend() { |
| 327 | + return NotSupported("Cannot create a merge append for a static table"); |
| 328 | +} |
| 329 | + |
319 | 330 | Result<std::shared_ptr<SnapshotManager>> StaticTable::NewSnapshotManager() { |
320 | 331 | return NotSupported("Cannot create a snapshot manager for a static table"); |
321 | 332 | } |
|
0 commit comments