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::WindowCollectionChunkScanner Class Reference
Collaboration diagram for duckdb::WindowCollectionChunkScanner:

Public Member Functions

 WindowCollectionChunkScanner (ColumnDataCollection &collection, const vector< column_t > &scan_ids, const idx_t begin_idx)
void Seek (idx_t begin_idx)
bool Scan ()
idx_t Scanned () const
LogicalType PrefixStructType (column_t end, column_t begin=0)
 Return a struct type for comparing keys.

Static Public Member Functions

static void ReferenceStructColumns (DataChunk &chunk, Vector &vec, column_t end, column_t begin=0)
 Reference the chunk into a struct vector matching the keys.

Public Attributes

ColumnDataCollection & collection
ColumnDataScanState state
DataChunk chunk
idx_t curr_idx

Constructor & Destructor Documentation

◆ WindowCollectionChunkScanner()

duckdb::WindowCollectionChunkScanner::WindowCollectionChunkScanner ( ColumnDataCollection & collection,
const vector< column_t > & scan_ids,
const idx_t begin_idx )
inline
163547 : collection(collection), curr_idx(0) {
163548 collection.InitializeScan(state, scan_ids);
163549 collection.InitializeScanChunk(state, chunk);
163550
163551 Seek(begin_idx);
163552 }

Member Function Documentation

◆ Seek()

void duckdb::WindowCollectionChunkScanner::Seek ( idx_t begin_idx)
inline
163554 {
163555 idx_t chunk_idx;
163556 idx_t seg_idx;
163557 idx_t row_idx;
163558 for (; curr_idx > begin_idx; --curr_idx) {
163559 collection.PrevScanIndex(state, chunk_idx, seg_idx, row_idx);
163560 }
163561 for (; curr_idx < begin_idx; ++curr_idx) {
163562 collection.NextScanIndex(state, chunk_idx, seg_idx, row_idx);
163563 }
163564 }
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237

◆ Scan()

bool duckdb::WindowCollectionChunkScanner::Scan ( )
inline
163566 {
163567 const auto result = collection.Scan(state, chunk);
163568 ++curr_idx;
163569 return result;
163570 }

◆ Scanned()

idx_t duckdb::WindowCollectionChunkScanner::Scanned ( ) const
inline
163572 {
163573 return state.next_row_index;
163574 }

◆ PrefixStructType()

LogicalType duckdb::WindowCollectionChunkScanner::PrefixStructType ( column_t end,
column_t begin = 0 )

Return a struct type for comparing keys.

254860 {
254861 child_list_t<LogicalType> partition_children;
254862 for (auto c = begin; c < end; ++c) {
254863 auto name = std::to_string(c);
254864 auto type = chunk.data[c].GetType();
254865 std::pair<string, LogicalType> child {name, type};
254866 partition_children.emplace_back(child);
254867 }
254868 // For single children, don;t build a struct - compare will be slow
254869 if (partition_children.size() == 1) {
254870 return partition_children[0].second;
254871 }
254872 return LogicalType::STRUCT(partition_children);
254873}

◆ ReferenceStructColumns()

void duckdb::WindowCollectionChunkScanner::ReferenceStructColumns ( DataChunk & chunk,
Vector & vec,
column_t end,
column_t begin = 0 )
static

Reference the chunk into a struct vector matching the keys.

254875 {
254876 // Check for single column
254877 const auto width = end - begin;
254878 if (width == 1) {
254879 vec.Reference(chunk.data[begin]);
254880 return;
254881 }
254882
254883 auto &entries = StructVector::GetEntries(vec);
254884 D_ASSERT(width == entries.size());
254885 for (column_t i = 0; i < entries.size(); ++i) {
254886 entries[i]->Reference(chunk.data[begin + i]);
254887 }
254888}
idx_t column_t
Type used for column identifiers.
Definition duckdb.hpp:259
Here is the call graph for this function:

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