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

Public Member Functions

 BaseStatistics (const BaseStatistics &other)=delete
 
BaseStatisticsoperator= (const BaseStatistics &)=delete
 
DUCKDB_API BaseStatistics (BaseStatistics &&other) noexcept
 enable move constructors
 
DUCKDB_API BaseStatisticsoperator= (BaseStatistics &&) noexcept
 
DUCKDB_API StatisticsType GetStatsType () const
 
DUCKDB_API bool CanHaveNull () const
 
DUCKDB_API bool CanHaveNoNull () const
 
void SetDistinctCount (idx_t distinct_count)
 
bool IsConstant () const
 
const LogicalTypeGetType () const
 
void Set (StatsInfo info)
 
void CombineValidity (const BaseStatistics &left, const BaseStatistics &right)
 
void CopyValidity (const BaseStatistics &stats)
 
void SetHasNullFast ()
 
void SetHasNoNullFast ()
 
void SetHasNull ()
 
void SetHasNoNull ()
 
void Merge (const BaseStatistics &other)
 
void Copy (const BaseStatistics &other)
 
unique_ptr< BaseStatisticsPushdownExtract (const StorageIndex &index) const
 
BaseStatistics Copy () const
 
unique_ptr< BaseStatisticsToUnique () const
 
void CopyBase (const BaseStatistics &orig)
 
void Serialize (Serializer &serializer) const
 
void Verify (Vector &vector, const SelectionVector &sel, idx_t count, bool ignore_has_null=false) const
 Verify that a vector does not violate the statistics.
 
void Verify (Vector &vector, idx_t count) const
 
string ToString () const
 
idx_t GetDistinctCount ()
 
template<class T >
void UpdateNumericStats (T new_value)
 
template<>
void UpdateNumericStats (interval_t new_value)
 
template<>
void UpdateNumericStats (list_entry_t new_value)
 

Static Public Member Functions

static BaseStatistics CreateUnknown (LogicalType type)
 
static BaseStatistics CreateEmpty (LogicalType type)
 
static DUCKDB_API StatisticsType GetStatsType (const LogicalType &type)
 
static BaseStatistics Deserialize (Deserializer &deserializer)
 
static BaseStatistics FromConstant (const Value &input)
 

Private Member Functions

 BaseStatistics (LogicalType type)
 
void InitializeUnknown ()
 
void InitializeEmpty ()
 

Static Private Member Functions

static void Construct (BaseStatistics &stats, LogicalType type)
 
static BaseStatistics CreateUnknownType (LogicalType type)
 
static BaseStatistics CreateEmptyType (LogicalType type)
 
static BaseStatistics FromConstantType (const Value &input)
 

Private Attributes

LogicalType type = LogicalType::INVALID
 The type of the logical segment.
 
bool has_null
 Whether or not the segment can contain NULL values.
 
bool has_no_null
 Whether or not the segment can contain values that are not null.
 
idx_t distinct_count
 estimate that one may have even if distinct_stats==nullptr
 
union { 
 
   NumericStatsData   numeric_data 
 Numeric stats data, for numeric stats.
 
   StringStatsData   string_data 
 String stats data, for string stats.
 
   GeometryStatsData   geometry_data 
 Geometry stats data, for geometry stats.
 
   VariantStatsData   variant_data 
 Variant stats data, for variant stats.
 
stats_union 
 Numeric and String stats.
 
unsafe_unique_array< BaseStatisticschild_stats
 Child stats (for LIST and STRUCT)
 

Friends

struct NumericStats
 
struct StringStats
 
struct StructStats
 
struct ListStats
 
struct ArrayStats
 
struct GeometryStats
 
struct VariantStats
 

Member Function Documentation

◆ CreateUnknown()

static BaseStatistics duckdb::BaseStatistics::CreateUnknown ( LogicalType  type)
static

Creates a set of statistics for data that is unknown, i.e. "has_null" is true, "has_no_null" is true, etc This can be used in case nothing is known about the data - or can be used as a baseline when only a few things are known

◆ CreateEmpty()

static BaseStatistics duckdb::BaseStatistics::CreateEmpty ( LogicalType  type)
static

Creates statistics for an empty database, i.e. "has_null" is false, "has_no_null" is false, etc This is used when incrementally constructing statistics by constantly adding new values

◆ GetType()

const LogicalType & duckdb::BaseStatistics::GetType ( ) const
inline
16314 {
16315 return type;
16316 }
LogicalType type
The type of the logical segment.
Definition duckdb.hpp:16378

◆ SetHasNullFast()

void duckdb::BaseStatistics::SetHasNullFast ( )
inline

Set that the CURRENT level can have null values Note that this is not correct for nested types unless this information is propagated in a different manner Use Set(StatsInfo::CAN_HAVE_NULL_VALUES) in the general case

16324 {
16325 has_null = true;
16326 }
bool has_null
Whether or not the segment can contain NULL values.
Definition duckdb.hpp:16380

◆ SetHasNoNullFast()

void duckdb::BaseStatistics::SetHasNoNullFast ( )
inline

Set that the CURRENT level can have valid values Note that this is not correct for nested types unless this information is propagated in a different manner Use Set(StatsInfo::CAN_HAVE_VALID_VALUES) in the general case

16330 {
16331 has_no_null = true;
16332 }
bool has_no_null
Whether or not the segment can contain values that are not null.
Definition duckdb.hpp:16382

◆ UpdateNumericStats() [1/3]

template<class T >
void duckdb::BaseStatistics::UpdateNumericStats ( new_value)
inline
16358 {
16359 D_ASSERT(GetStatsType() == StatisticsType::NUMERIC_STATS);
16360 NumericStats::Update(stats_union.numeric_data, new_value);
16361 }
union duckdb::BaseStatistics::@31 stats_union
Numeric and String stats.

◆ UpdateNumericStats() [2/3]

template<>
void duckdb::BaseStatistics::UpdateNumericStats ( interval_t  new_value)
inline
16401 {
16402}

◆ UpdateNumericStats() [3/3]

template<>
void duckdb::BaseStatistics::UpdateNumericStats ( list_entry_t  new_value)
inline
16404 {
16405}

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