29#include <unordered_set>
51 std::shared_ptr<TransactionContext> ctx);
161 const std::shared_ptr<Snapshot>& snapshot)
override;
164 explicit RowDelta(std::string table_name, std::shared_ptr<TransactionContext> ctx);
166 Status ValidateNoConflictingFileAndPositionDeletes()
const;
168 std::optional<int64_t> starting_snapshot_id_;
169 std::unordered_set<std::string> referenced_data_files_;
171 bool validate_deletes_ =
false;
172 std::shared_ptr<Expression> conflict_detection_filter_;
173 bool validate_new_data_files_ =
false;
174 bool validate_new_delete_files_ =
false;
A set of DataFile pointers with insertion order preserved and deduplicated by file path.
Definition data_file_set.h:44
Abstract base class for merge-based snapshot write operations.
Definition merging_snapshot_update.h:63
API for encoding row-level changes to a table.
Definition row_delta.h:47
RowDelta & ValidateFromSnapshot(int64_t snapshot_id)
Set the snapshot ID used in any reads for this operation.
RowDelta & RemoveRows(const std::shared_ptr< DataFile > &file)
Remove a DataFile from the table.
RowDelta & ValidateNoConflictingDeleteFiles()
Enable validation that concurrent delete files do not conflict.
RowDelta & ValidateDataFilesExist(std::span< const std::string > referenced_files)
Add data file paths that must not be removed by conflicting commits.
RowDelta & AddRows(const std::shared_ptr< DataFile > &inserts)
Add a DataFile to the table.
RowDelta & ValidateDeletedFiles()
Enable validation that referenced data files were not deleted.
RowDelta & ValidateNoConflictingDataFiles()
Enable validation that concurrent data files do not conflict.
static Result< std::unique_ptr< RowDelta > > Make(std::string table_name, std::shared_ptr< TransactionContext > ctx)
Create a new RowDelta instance.
std::string operation() override
A string that describes the action that produced the new snapshot.
Status Validate(const TableMetadata ¤t_metadata, const std::shared_ptr< Snapshot > &snapshot) override
Validate the current metadata.
RowDelta & RemoveDeletes(const std::shared_ptr< DataFile > &deletes)
Remove a rewritten DeleteFile from the table.
RowDelta & ConflictDetectionFilter(std::shared_ptr< Expression > filter)
Set a conflict detection filter used to validate concurrently added data and delete files.
RowDelta & CaseSensitive(bool case_sensitive)
Enable or disable case-sensitive expression binding for validations.
RowDelta & AddDeletes(const std::shared_ptr< DataFile > &deletes)
Add a DeleteFile to the table.
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.