Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::UncompressedCompressState Struct Reference
Inheritance diagram for duckdb::UncompressedCompressState:
Collaboration diagram for duckdb::UncompressedCompressState:

Public Member Functions

 UncompressedCompressState (ColumnDataCheckpointData &checkpoint_data, const CompressionInfo &info)
virtual void CreateEmptySegment ()
void FlushSegment (idx_t segment_size)
void Finalize (idx_t segment_size)
Public Member Functions inherited from duckdb::CompressionState
 CompressionState (const CompressionInfo &info)
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const

Public Attributes

ColumnDataCheckpointData & checkpoint_data
const CompressionFunction & function
unique_ptr< ColumnSegment > current_segment
ColumnAppendState append_state
Public Attributes inherited from duckdb::CompressionState
CompressionInfo info

Constructor & Destructor Documentation

◆ UncompressedCompressState()

duckdb::UncompressedCompressState::UncompressedCompressState ( ColumnDataCheckpointData & checkpoint_data,
const CompressionInfo & info )
400629 : CompressionState(info), checkpoint_data(checkpoint_data),
400630 function(checkpoint_data.GetCompressionFunction(CompressionType::COMPRESSION_UNCOMPRESSED)) {
400631 UncompressedCompressState::CreateEmptySegment();
400632}

Member Function Documentation

◆ CreateEmptySegment()

void duckdb::UncompressedCompressState::CreateEmptySegment ( )
virtual
400634 {
400635 auto &db = checkpoint_data.GetDatabase();
400636 auto &type = checkpoint_data.GetType();
400637
400638 auto compressed_segment =
400639 ColumnSegment::CreateTransientSegment(db, function, type, info.GetBlockSize(), info.GetBlockManager());
400640 if (type.InternalType() == PhysicalType::VARCHAR) {
400641 auto &state = compressed_segment->GetSegmentState()->Cast<UncompressedStringSegmentState>();
400642 auto &storage_manager = checkpoint_data.GetStorageManager();
400643 if (!storage_manager.InMemory()) {
400644 auto &partial_block_manager = checkpoint_data.GetCheckpointState().GetPartialBlockManager();
400645 state.block_manager = partial_block_manager.GetBlockManager();
400646 state.overflow_writer = make_uniq<WriteOverflowStringsToDisk>(partial_block_manager);
400647 }
400648 }
400649 current_segment = std::move(compressed_segment);
400650 current_segment->InitializeAppend(append_state);
400651}
db
@ VARCHAR
DuckDB Extensions.
Definition duckdb.hpp:2847

◆ FlushSegment()

void duckdb::UncompressedCompressState::FlushSegment ( idx_t segment_size)
400653 {
400654 auto &state = checkpoint_data.GetCheckpointState();
400655 if (current_segment->type.InternalType() == PhysicalType::VARCHAR) {
400656 auto &segment_state = current_segment->GetSegmentState()->Cast<UncompressedStringSegmentState>();
400657 if (segment_state.overflow_writer) {
400658 segment_state.overflow_writer->Flush();
400659 segment_state.overflow_writer.reset();
400660 }
400661 }
400662 append_state.child_appends.clear();
400663 append_state.append_state.reset();
400664 append_state.lock.reset();
400665 state.FlushSegmentInternal(std::move(current_segment), segment_size);
400666}

◆ Finalize()

void duckdb::UncompressedCompressState::Finalize ( idx_t segment_size)
400668 {
400669 FlushSegment(segment_size);
400670 current_segment.reset();
400671}

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