250786 {
250787 vector<Value> result;
250788 switch (type.InternalType()) {
250790 vector<child_list_t<Value>> struct_children;
250791 auto &child_types = StructType::GetChildTypes(type);
250792
250793 struct_children.resize(TEST_VECTOR_CARDINALITY);
250794 for (auto &child_type : child_types) {
250795 auto child_values = GenerateValues(info, child_type.second);
250796
250797 for (
idx_t i = 0; i < child_values.size(); i++) {
250798 struct_children[i].push_back(make_pair(child_type.first, std::move(child_values[i])));
250799 }
250800 }
250801 for (auto &struct_child : struct_children) {
250803 }
250804 break;
250805 }
250807 if (type.id() == LogicalTypeId::MAP) {
250808 auto &child_type = ListType::GetChildType(type);
250809 auto child_values = GenerateValues(info, child_type);
250810 result.push_back(
Value::MAP(child_type, {child_values[0]}));
250811 result.push_back(Value(type));
250812 result.push_back(
Value::MAP(child_type, {child_values[1]}));
250813 break;
250814 }
250815 auto &child_type = ListType::GetChildType(type);
250816 auto child_values = GenerateValues(info, child_type);
250817
250818 result.push_back(
Value::LIST(child_type, {child_values[0], child_values[1]}));
250820 result.push_back(
Value::LIST(child_type, {child_values[2]}));
250821 break;
250822 }
250823 default: {
250824 auto entry = info.test_type_map.find(type.id());
250825 if (entry == info.test_type_map.end()) {
250826 throw NotImplementedException("Unimplemented type for test_vector_types %s", type.ToString());
250827 }
250828 result.push_back(entry->second.min_value);
250829 result.push_back(entry->second.max_value);
250830 result.emplace_back(type);
250831 break;
250832 }
250833 }
250834 return result;
250835 }
static DUCKDB_API Value MAP(const LogicalType &child_type, vector< Value > values)
Create a map value with the given entries.
Definition duckdb.cpp:132466
static DUCKDB_API Value LIST(const LogicalType &child_type, vector< Value > values)
Create a list value with the given entries.
Definition duckdb.cpp:132555
static DUCKDB_API Value STRUCT(child_list_t< Value > values)
Create a struct value with given list of entries.
Definition duckdb.cpp:132434
@ LIST
A list of some logical data type.
Definition duckdb.hpp:2813
@ STRUCT
Struct of logical types.
Definition duckdb.hpp:2816
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237