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

Static Public Member Functions

static DUCKDB_API const LogicalType & GetChildType (const LogicalType &type)
static DUCKDB_API idx_t GetSize (const LogicalType &type)
static DUCKDB_API bool IsAnySize (const LogicalType &type)
static DUCKDB_API LogicalType ConvertToList (const LogicalType &type)
 Recursively replace all ARRAY types to LIST types within the given type.

Static Public Attributes

static DUCKDB_API constexpr idx_t MAX_ARRAY_SIZE = 100000

Member Function Documentation

◆ GetChildType()

const LogicalType & duckdb::ArrayType::GetChildType ( const LogicalType & type)
static
140806 {
140807 D_ASSERT(type.id() == LogicalTypeId::ARRAY);
140808 auto info = type.AuxInfo();
140809 return info->Cast<ArrayTypeInfo>().child_type;
140810}

◆ GetSize()

idx_t duckdb::ArrayType::GetSize ( const LogicalType & type)
static
140812 {
140813 D_ASSERT(type.id() == LogicalTypeId::ARRAY);
140814 auto info = type.AuxInfo();
140815 return info->Cast<ArrayTypeInfo>().size;
140816}

◆ IsAnySize()

bool duckdb::ArrayType::IsAnySize ( const LogicalType & type)
static
140818 {
140819 D_ASSERT(type.id() == LogicalTypeId::ARRAY);
140820 auto info = type.AuxInfo();
140821 return info->Cast<ArrayTypeInfo>().size == 0;
140822}

◆ ConvertToList()

LogicalType duckdb::ArrayType::ConvertToList ( const LogicalType & type)
static

Recursively replace all ARRAY types to LIST types within the given type.

140824 {
140825 switch (type.id()) {
140826 case LogicalTypeId::ARRAY: {
140827 return LogicalType::LIST(ConvertToList(ArrayType::GetChildType(type)));
140828 }
140829 case LogicalTypeId::LIST:
140830 return LogicalType::LIST(ConvertToList(ListType::GetChildType(type)));
140831 case LogicalTypeId::STRUCT: {
140832 auto children = StructType::GetChildTypes(type);
140833 for (auto &child : children) {
140834 child.second = ConvertToList(child.second);
140835 }
140836 return LogicalType::STRUCT(children);
140837 }
140838 case LogicalTypeId::MAP: {
140839 auto key_type = ConvertToList(MapType::KeyType(type));
140840 auto value_type = ConvertToList(MapType::ValueType(type));
140841 return LogicalType::MAP(key_type, value_type);
140842 }
140843 case LogicalTypeId::UNION: {
140844 auto children = UnionType::CopyMemberTypes(type);
140845 for (auto &child : children) {
140846 child.second = ConvertToList(child.second);
140847 }
140848 return LogicalType::UNION(children);
140849 }
140850 default:
140851 return type;
140852 }
140853}
R value_type
static DUCKDB_API LogicalType ConvertToList(const LogicalType &type)
Recursively replace all ARRAY types to LIST types within the given type.
Definition duckdb.cpp:140824
Here is the call graph for this function:
Here is the caller graph for this function:

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