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::dict_fsst::DictFSSTCompressionStorage Struct Reference

Static Public Member Functions

static unique_ptr< AnalyzeState > StringInitAnalyze (ColumnData &col_data, PhysicalType type)
static bool StringAnalyze (AnalyzeState &state_p, Vector &input, idx_t count)
static idx_t StringFinalAnalyze (AnalyzeState &state_p)
static unique_ptr< CompressionState > InitCompression (ColumnDataCheckpointData &checkpoint_data, unique_ptr< AnalyzeState > state)
static void Compress (CompressionState &state_p, Vector &scan_vector, idx_t count)
static void FinalizeCompress (CompressionState &state_p)
static unique_ptr< SegmentScanState > StringInitScan (const QueryContext &context, ColumnSegment &segment)
template<bool ALLOW_DICT_VECTORS>
static void StringScanPartial (ColumnSegment &segment, ColumnScanState &state, idx_t scan_count, Vector &result, idx_t result_offset)
static void StringScan (ColumnSegment &segment, ColumnScanState &state, idx_t scan_count, Vector &result)
static void StringFetchRow (ColumnSegment &segment, ColumnFetchState &state, row_t row_id, Vector &result, idx_t result_idx)

Member Function Documentation

◆ StringInitAnalyze()

unique_ptr< AnalyzeState > duckdb::dict_fsst::DictFSSTCompressionStorage::StringInitAnalyze ( ColumnData & col_data,
PhysicalType type )
static
399512 {
399513 auto &storage_manager = col_data.GetStorageManager();
399514 if (storage_manager.GetStorageVersion() < 5) {
399515 // dict_fsst not introduced yet, disable it
399516 return nullptr;
399517 }
399518
399519 CompressionInfo info(col_data.GetBlockManager());
399520 return make_uniq<DictFSSTAnalyzeState>(info);
399521}

◆ StringAnalyze()

bool duckdb::dict_fsst::DictFSSTCompressionStorage::StringAnalyze ( AnalyzeState & state_p,
Vector & input,
idx_t count )
static
399523 {
399524 auto &analyze_state = state_p.Cast<DictFSSTAnalyzeState>();
399525 return analyze_state.Analyze(input, count);
399526}

◆ StringFinalAnalyze()

idx_t duckdb::dict_fsst::DictFSSTCompressionStorage::StringFinalAnalyze ( AnalyzeState & state_p)
static
399528 {
399529 auto &analyze_state = state_p.Cast<DictFSSTAnalyzeState>();
399530 return analyze_state.FinalAnalyze();
399531}

◆ InitCompression()

unique_ptr< CompressionState > duckdb::dict_fsst::DictFSSTCompressionStorage::InitCompression ( ColumnDataCheckpointData & checkpoint_data,
unique_ptr< AnalyzeState > state )
static
399537 {
399538 return make_uniq<DictFSSTCompressionState>(checkpoint_data,
399539 unique_ptr_cast<AnalyzeState, DictFSSTAnalyzeState>(std::move(state)));
399540}

◆ Compress()

void duckdb::dict_fsst::DictFSSTCompressionStorage::Compress ( CompressionState & state_p,
Vector & scan_vector,
idx_t count )
static
399542 {
399543 auto &state = state_p.Cast<DictFSSTCompressionState>();
399544 state.Compress(scan_vector, count);
399545}

◆ FinalizeCompress()

void duckdb::dict_fsst::DictFSSTCompressionStorage::FinalizeCompress ( CompressionState & state_p)
static
399547 {
399548 auto &state = state_p.Cast<DictFSSTCompressionState>();
399549 state.Flush(true);
399550}

◆ StringInitScan()

unique_ptr< SegmentScanState > duckdb::dict_fsst::DictFSSTCompressionStorage::StringInitScan ( const QueryContext & context,
ColumnSegment & segment )
static
399556 {
399557 auto &buffer_manager = BufferManager::GetBufferManager(segment.db);
399558 auto state = make_uniq<CompressedStringScanState>(segment, buffer_manager.Pin(segment.block));
399559 state->Initialize(true);
399560
399561 const auto &stats = segment.stats.statistics;
399562 if (stats.GetStatsType() == StatisticsType::STRING_STATS && StringStats::HasMaxStringLength(stats)) {
399563 state->all_values_inlined = StringStats::MaxStringLength(stats) <= string_t::INLINE_LENGTH;
399564 }
399565 return std::move(state);
399566}
static DUCKDB_API uint32_t MaxStringLength(const BaseStatistics &stats)
Returns the maximum string length, or throws an exception if !HasMaxStringLength().
Definition duckdb.cpp:424560
static DUCKDB_API bool HasMaxStringLength(const BaseStatistics &stats)
Whether or not the statistics have a maximum string length defined.
Definition duckdb.cpp:424553

◆ StringScanPartial()

template<bool ALLOW_DICT_VECTORS>
void duckdb::dict_fsst::DictFSSTCompressionStorage::StringScanPartial ( ColumnSegment & segment,
ColumnScanState & state,
idx_t scan_count,
Vector & result,
idx_t result_offset )
static
399573 {
399574 // clear any previously locked buffers and get the primary buffer handle
399575 auto &scan_state = state.scan_state->Cast<CompressedStringScanState>();
399576
399577 auto start = state.GetPositionInSegment();
399578 if (!ALLOW_DICT_VECTORS || !scan_state.AllowDictionaryScan(scan_count)) {
399579 scan_state.ScanToFlatVector(result, result_offset, start, scan_count);
399580 } else {
399581 scan_state.ScanToDictionaryVector(segment, result, result_offset, start, scan_count);
399582 }
399583}

◆ StringScan()

void duckdb::dict_fsst::DictFSSTCompressionStorage::StringScan ( ColumnSegment & segment,
ColumnScanState & state,
idx_t scan_count,
Vector & result )
static
399586 {
399587 StringScanPartial<true>(segment, state, scan_count, result, 0);
399588}

◆ StringFetchRow()

void duckdb::dict_fsst::DictFSSTCompressionStorage::StringFetchRow ( ColumnSegment & segment,
ColumnFetchState & state,
row_t row_id,
Vector & result,
idx_t result_idx )
static
399594 {
399595 // fetch a single row from the string segment
399596 CompressedStringScanState scan_state(segment, state.GetOrInsertHandle(segment));
399597 scan_state.Initialize(false);
399598 scan_state.ScanToFlatVector(result, result_idx, NumericCast<idx_t>(row_id), 1);
399599}

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