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::PartitionedColumnData Class Reference

#include <duckdb.hpp>

Inheritance diagram for duckdb::PartitionedColumnData:
Collaboration diagram for duckdb::PartitionedColumnData:

Public Member Functions

unique_ptr< PartitionedColumnDataCreateShared ()
 
void InitializeAppendState (PartitionedColumnDataAppendState &state) const
 Initializes a local state for parallel partitioning that can be merged into this PartitionedColumnData.
 
void Append (PartitionedColumnDataAppendState &state, DataChunk &input)
 Appends a DataChunk to this PartitionedColumnData.
 
void FlushAppendState (PartitionedColumnDataAppendState &state)
 Flushes any remaining data in the append state into this PartitionedColumnData.
 
void Combine (PartitionedColumnData &other)
 Combine another PartitionedColumnData into this PartitionedColumnData.
 
vector< unique_ptr< ColumnDataCollection > > & GetPartitions ()
 Get the partitions in this PartitionedColumnData.
 
template<class TARGET >
TARGETCast ()
 
template<class TARGET >
const TARGETCast () const
 

Protected Member Functions

virtual idx_t BufferSize () const
 Size of the buffers in the append states for this type of partitioning (default 128)
 
virtual void InitializeAppendStateInternal (PartitionedColumnDataAppendState &state) const
 Initialize a PartitionedColumnDataAppendState for this type of partitioning (optional)
 
virtual void ComputePartitionIndices (PartitionedColumnDataAppendState &state, DataChunk &input)
 
virtual idx_t MaxPartitionIndex () const
 Maximum partition index (optional)
 
 PartitionedColumnData (PartitionedColumnDataType type, ClientContext &context, vector< LogicalType > types)
 PartitionedColumnData can only be instantiated by derived classes.
 
 PartitionedColumnData (const PartitionedColumnData &other)
 
idx_t HalfBufferSize () const
 If the buffer is half full, we append to the partition.
 
void CreateAllocator ()
 Create a new shared allocator.
 
bool UseFixedSizeMap () const
 Whether to use fixed size map or regular map.
 
void BuildPartitionSel (PartitionedColumnDataAppendState &state, const idx_t append_count) const
 
template<bool fixed>
void AppendInternal (PartitionedColumnDataAppendState &state, DataChunk &input)
 Appends a DataChunk to this PartitionedColumnData.
 
unique_ptr< ColumnDataCollectionCreatePartitionCollection (idx_t partition_index) const
 Create a collection for a specific a partition.
 
unique_ptr< DataChunkCreatePartitionBuffer () const
 Create a DataChunk used for buffering appends to the partition.
 

Static Protected Member Functions

template<bool fixed>
static void BuildPartitionSel (PartitionedColumnDataAppendState &state, const idx_t append_count)
 

Protected Attributes

PartitionedColumnDataType type
 
ClientContextcontext
 
vector< LogicalTypetypes
 
mutex lock
 
shared_ptr< PartitionColumnDataAllocatorsallocators
 
vector< unique_ptr< ColumnDataCollection > > partitions
 

Detailed Description

PartitionedColumnData represents partitioned columnar data, which serves as an interface for different types of partitioning, e.g., radix, hive

Member Function Documentation

◆ BufferSize()

virtual idx_t duckdb::PartitionedColumnData::BufferSize ( ) const
inlineprotectedvirtual

Size of the buffers in the append states for this type of partitioning (default 128)

47049 {
47050 return MinValue<idx_t>(128, STANDARD_VECTOR_SIZE);
47051 }
Here is the caller graph for this function:

◆ InitializeAppendStateInternal()

virtual void duckdb::PartitionedColumnData::InitializeAppendStateInternal ( PartitionedColumnDataAppendState state) const
inlineprotectedvirtual

Initialize a PartitionedColumnDataAppendState for this type of partitioning (optional)

47053 {
47054 }

◆ ComputePartitionIndices()

virtual void duckdb::PartitionedColumnData::ComputePartitionIndices ( PartitionedColumnDataAppendState state,
DataChunk input 
)
inlineprotectedvirtual

Compute the partition indices for this type of partitioning for the input DataChunk and store them in the partition_data of the local state. If this type creates partitions on the fly (for, e.g., hive), this function is also in charge of creating new partitions and mapping the input data to a partition index

Reimplemented in duckdb::HivePartitionedColumnData.

47058 {
47059 throw NotImplementedException("ComputePartitionIndices for this type of PartitionedColumnData");
47060 }

◆ MaxPartitionIndex()

virtual idx_t duckdb::PartitionedColumnData::MaxPartitionIndex ( ) const
inlineprotectedvirtual

Maximum partition index (optional)

47064 {
47066 }
static constexpr const idx_t INVALID_INDEX
The value used to signify an invalid index entry.
Definition duckdb.hpp:1117

◆ HalfBufferSize()

idx_t duckdb::PartitionedColumnData::HalfBufferSize ( ) const
inlineprotected

If the buffer is half full, we append to the partition.

47074 {
47075 D_ASSERT(IsPowerOfTwo(BufferSize()));
47076 return BufferSize() / 2;
47077 }
virtual idx_t BufferSize() const
Size of the buffers in the append states for this type of partitioning (default 128)
Definition duckdb.hpp:47049
Here is the call graph for this function:

◆ BuildPartitionSel()

void duckdb::PartitionedColumnData::BuildPartitionSel ( PartitionedColumnDataAppendState state,
const idx_t  append_count 
) const
protected

Builds a selection vector in the Append state for the partitions

  • returns true if everything belongs to the same partition - stores partition index in single_partition_idx

◆ CreatePartitionCollection()

unique_ptr< ColumnDataCollection > duckdb::PartitionedColumnData::CreatePartitionCollection ( idx_t  partition_index) const
inlineprotected

Create a collection for a specific a partition.

47091 {
47092 return make_uniq<ColumnDataCollection>(allocators->allocators[partition_index], types);
47093 }
Here is the caller graph for this function:

◆ Cast() [1/2]

template<class TARGET >
TARGET & duckdb::PartitionedColumnData::Cast ( )
inline
47108 {
47109 DynamicCastCheck<TARGET>(this);
47110 return reinterpret_cast<TARGET &>(*this);
47111 }

◆ Cast() [2/2]

template<class TARGET >
const TARGET & duckdb::PartitionedColumnData::Cast ( ) const
inline
47113 {
47114 DynamicCastCheck<TARGET>(this);
47115 return reinterpret_cast<const TARGET &>(*this);
47116 }

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