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

Static Public Member Functions

static unique_ptr< ArrowTypeGetType (ClientContext &context, const ArrowSchema &schema, const ArrowSchemaMetadata &schema_metadata)
 
static void PopulateSchema (DuckDBArrowSchemaHolder &root_holder, ArrowSchema &schema, const LogicalType &type, ClientContext &context, const ArrowTypeExtension &extension)
 

Member Function Documentation

◆ GetType()

static unique_ptr< ArrowType > duckdb::ArrowJson::GetType ( ClientContext context,
const ArrowSchema schema,
const ArrowSchemaMetadata schema_metadata 
)
inlinestatic
45230 {
45231 const auto format = string(schema.format);
45232 if (format == "u") {
45233 return make_uniq<ArrowType>(LogicalType::JSON(), make_uniq<ArrowStringInfo>(ArrowVariableSizeType::NORMAL));
45234 } else if (format == "U") {
45235 return make_uniq<ArrowType>(LogicalType::JSON(),
45236 make_uniq<ArrowStringInfo>(ArrowVariableSizeType::SUPER_SIZE));
45237 } else if (format == "vu") {
45238 return make_uniq<ArrowType>(LogicalType::JSON(), make_uniq<ArrowStringInfo>(ArrowVariableSizeType::VIEW));
45239 }
45240 throw InvalidInputException("Arrow extension type \"%s\" not supported for arrow.json", format.c_str());
45241 }
const char * format
Array type description.
Definition duckdb.hpp:11265

◆ PopulateSchema()

static void duckdb::ArrowJson::PopulateSchema ( DuckDBArrowSchemaHolder root_holder,
ArrowSchema schema,
const LogicalType type,
ClientContext context,
const ArrowTypeExtension extension 
)
inlinestatic
45244 {
45245 const ArrowSchemaMetadata schema_metadata =
45246 ArrowSchemaMetadata::ArrowCanonicalType(extension.GetInfo().GetExtensionName());
45247 root_holder.metadata_info.emplace_back(schema_metadata.SerializeMetadata());
45248 schema.metadata = root_holder.metadata_info.back().get();
45249 const auto options = context.GetClientProperties();
45250 if (options.produce_arrow_string_view) {
45251 schema.format = "vu";
45252 } else {
45253 if (options.arrow_offset_size == ArrowOffsetSize::LARGE) {
45254 schema.format = "U";
45255 } else {
45256 schema.format = "u";
45257 }
45258 }
45259 }
static ArrowSchemaMetadata ArrowCanonicalType(const string &extension_name)
Creates the metadata based on an extension name.
Definition duckdb.cpp:46317

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