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::LateMaterializationHelper Struct Reference

Static Public Member Functions

static unique_ptr< LogicalGet > CreateLHSGet (const LogicalGet &rhs, Binder &binder)
static vector< idx_t > GetOrInsertRowIds (LogicalGet &get, const vector< column_t > &row_id_column_ids, const vector< TableColumn > &row_id_columns)

Member Function Documentation

◆ CreateLHSGet()

unique_ptr< LogicalGet > duckdb::LateMaterializationHelper::CreateLHSGet ( const LogicalGet & rhs,
Binder & binder )
static
315002 {
315003 // we need to construct a new scan of the same table
315004 auto table_index = binder.GenerateTableIndex();
315005 auto new_get = make_uniq<LogicalGet>(table_index, rhs.function, rhs.bind_data->Copy(), rhs.returned_types,
315006 rhs.names, rhs.virtual_columns);
315007 new_get->GetMutableColumnIds() = rhs.GetColumnIds();
315008 new_get->projection_ids = rhs.projection_ids;
315009 new_get->parameters = rhs.parameters;
315010 new_get->named_parameters = rhs.named_parameters;
315011 new_get->input_table_types = rhs.input_table_types;
315012 new_get->input_table_names = rhs.input_table_names;
315013 return new_get;
315014}

◆ GetOrInsertRowIds()

vector< idx_t > duckdb::LateMaterializationHelper::GetOrInsertRowIds ( LogicalGet & get,
const vector< column_t > & row_id_column_ids,
const vector< TableColumn > & row_id_columns )
static
315017 {
315018 auto &column_ids = get.GetMutableColumnIds();
315019
315020 vector<idx_t> result;
315021 for (idx_t r_idx = 0; r_idx < row_id_column_ids.size(); ++r_idx) {
315022 // check if it is already projected
315023 auto row_id_column_id = row_id_column_ids[r_idx];
315024 auto &row_id_column = row_id_columns[r_idx];
315025 optional_idx row_id_index;
315026 for (idx_t i = 0; i < column_ids.size(); ++i) {
315027 if (column_ids[i].GetPrimaryIndex() == row_id_column_id) {
315028 // already projected - return the id
315029 row_id_index = i;
315030 break;
315031 }
315032 }
315033 if (row_id_index.IsValid()) {
315034 result.push_back(row_id_index.GetIndex());
315035 continue;
315036 }
315037 // row id is not yet projected - push it and return the new index
315038 column_ids.push_back(ColumnIndex(row_id_column_id));
315039 if (!get.projection_ids.empty()) {
315040 get.projection_ids.push_back(column_ids.size() - 1);
315041 }
315042 if (!get.types.empty()) {
315043 get.types.push_back(row_id_column.type);
315044 }
315045 result.push_back(column_ids.size() - 1);
315046 }
315047 return result;
315048}
__host__ cudaTextureObject_t get() const noexcept
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237

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