66 std::string table_name, std::shared_ptr<TransactionContext> ctx);
121 const std::shared_ptr<Snapshot>& snapshot)
override;
129 const std::shared_ptr<Snapshot>& snapshot)
override;
133 std::shared_ptr<TransactionContext> ctx);
135 std::optional<int64_t> starting_snapshot_id_;
136 bool validate_conflicting_data_{
false};
137 bool validate_conflicting_deletes_{
false};
138 PartitionSet replaced_partitions_;
Abstract base class for merge-based snapshot write operations.
Definition merging_snapshot_update.h:63
API for overwriting files in a table by partition.
Definition replace_partitions.h:58
ReplacePartitions & ValidateFromSnapshot(int64_t snapshot_id)
Set the snapshot ID used in validations for this operation.
std::string operation() override
A string that describes the action that produced the new snapshot.
Result< std::vector< ManifestFile > > Apply(const TableMetadata ¤t_metadata, const std::shared_ptr< Snapshot > &snapshot) override
Apply changes, translating the fail-any-delete error.
ReplacePartitions & ValidateNoConflictingDeletes()
Enable validation that deletes that happened concurrently do not conflict with this operation.
ReplacePartitions & ValidateNoConflictingData()
Enable validation that data added concurrently does not conflict with this operation.
static Result< std::unique_ptr< ReplacePartitions > > Make(std::string table_name, std::shared_ptr< TransactionContext > ctx)
Create a new ReplacePartitions instance.
ReplacePartitions & AddFile(const std::shared_ptr< DataFile > &file)
Add a data file to the table.
ReplacePartitions & ValidateAppendOnly()
Validate that no partitions will be replaced and the operation is append-only.
Status Validate(const TableMetadata ¤t_metadata, const std::shared_ptr< Snapshot > &snapshot) override
Validate the current metadata.
Define symbol visibility macros for core Iceberg APIs.
Core Apache Iceberg C++ APIs.
Definition arrow_io_util.h:33
std::expected< T, E > Result
Result alias.
Definition result.h:88
Define Result, Status, and error helpers.