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::ExtensionTypeInfo Struct Reference
Collaboration diagram for duckdb::ExtensionTypeInfo:

Public Member Functions

void Serialize (Serializer &serializer) const
 

Static Public Member Functions

static unique_ptr< ExtensionTypeInfoDeserialize (Deserializer &source)
 
static bool Equals (optional_ptr< ExtensionTypeInfo > rhs, optional_ptr< ExtensionTypeInfo > lhs)
 

Public Attributes

vector< LogicalTypeModifiermodifiers
 
unordered_map< string, Valueproperties
 

Member Function Documentation

◆ Equals()

bool duckdb::ExtensionTypeInfo::Equals ( optional_ptr< ExtensionTypeInfo rhs,
optional_ptr< ExtensionTypeInfo lhs 
)
static
72123 {
72124 // Either both are null, or both are the same, so they are equal
72125 if (lhs.get() == rhs.get()) {
72126 return true;
72127 }
72128 // If one is null, then we cant compare them
72129 if (lhs == nullptr || rhs == nullptr) {
72130 return true;
72131 }
72132
72133 // Both are not null, so we can compare them
72134 D_ASSERT(lhs != nullptr && rhs != nullptr);
72135
72136 // Compare modifiers
72137 const auto &lhs_mods = lhs->modifiers;
72138 const auto &rhs_mods = rhs->modifiers;
72139 const auto common_mods = MinValue(lhs_mods.size(), rhs_mods.size());
72140 for (idx_t i = 0; i < common_mods; i++) {
72141 // If the types are not strictly equal, they are not equal
72142 auto &lhs_val = lhs_mods[i].value;
72143 auto &rhs_val = rhs_mods[i].value;
72144
72145 if (lhs_val.type() != rhs_val.type()) {
72146 return false;
72147 }
72148
72149 // If both are null, its fine
72150 if (lhs_val.IsNull() && rhs_val.IsNull()) {
72151 continue;
72152 }
72153
72154 // If one is null, the other must be null too
72155 if (lhs_val.IsNull() != rhs_val.IsNull()) {
72156 return false;
72157 }
72158
72159 if (lhs_val != rhs_val) {
72160 return false;
72161 }
72162 }
72163
72164 // Properties are optional, so only compare those present in both
72165 const auto &lhs_props = lhs->properties;
72166 const auto &rhs_props = rhs->properties;
72167
72168 for (const auto &kv : lhs_props) {
72169 auto it = rhs_props.find(kv.first);
72170 if (it == rhs_props.end()) {
72171 // Continue
72172 continue;
72173 }
72174 if (kv.second != it->second) {
72175 // Mismatch!
72176 return false;
72177 }
72178 }
72179
72180 // All ok!
72181 return true;
72182}

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