iceberg-cpp
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
iceberg::DeleteFileSet Class Reference

A set of delete-file pointers deduplicated by delete-file identity. More...

#include <data_file_set.h>

Public Types

using value_type = std::shared_ptr< DataFile >
 
using iterator = typename std::vector< value_type >::iterator
 
using const_iterator = typename std::vector< value_type >::const_iterator
 
using difference_type = typename std::vector< value_type >::difference_type
 

Public Member Functions

 DeleteFileSet (const DeleteFileSet &other)
 
DeleteFileSetoperator= (const DeleteFileSet &other)
 
 DeleteFileSet (DeleteFileSet &&) noexcept=default
 
DeleteFileSetoperator= (DeleteFileSet &&) noexcept=default
 
std::pair< iterator, bool > insert (const value_type &file)
 Insert a delete file into the set.
 
std::pair< iterator, bool > insert (value_type &&file)
 Insert a delete file into the set (move version).
 
bool contains (const DataFile &file) const
 Returns whether an equivalent delete file exists in the set.
 
bool contains (const value_type &file) const
 Returns whether an equivalent delete file exists in the set.
 
size_t size () const
 Get the number of elements in the set.
 
bool empty () const
 Check if the set is empty.
 
void clear ()
 Clear all elements from the set.
 
iterator begin ()
 Get iterator to the beginning.
 
const_iterator begin () const
 
const_iterator cbegin () const
 
iterator end ()
 Get iterator to the end.
 
const_iterator end () const
 
const_iterator cend () const
 
std::span< const value_type > as_span () const
 Get a non-owning view of the delete files in insertion order.
 

Detailed Description

A set of delete-file pointers deduplicated by delete-file identity.

Delete files, especially deletion vectors, are identified by location plus content offset and content size. This mirrors Java's DeleteFileSet behavior.

Member Function Documentation

◆ insert()

std::pair< iterator, bool > iceberg::DeleteFileSet::insert ( const value_type &  file)
inline

Insert a delete file into the set.

Parameters
fileThe delete file to insert
Returns
A pair with an iterator to the inserted element (or the existing one) and a bool indicating whether insertion took place

The documentation for this class was generated from the following file: