MCPcopy Create free account
hub / github.com/apache/arrow / garrow_schema_new

Function garrow_schema_new

c_glib/arrow-glib/schema.cpp:154–165  ·  view source on GitHub ↗

* garrow_schema_new: * @fields: (element-type GArrowField): The fields of the schema. * * Returns: A newly created #GArrowSchema. */

Source from the content-addressed store, hash-verified

152 * Returns: A newly created #GArrowSchema.
153 */
154GArrowSchema *
155garrow_schema_new(GList *fields)
156{
157 std::vector<std::shared_ptr<arrow::Field>> arrow_fields;
158 for (GList *node = fields; node; node = node->next) {
159 GArrowField *field = GARROW_FIELD(node->data);
160 arrow_fields.push_back(garrow_field_get_raw(field));
161 }
162
163 auto arrow_schema = std::make_shared<arrow::Schema>(arrow_fields);
164 return garrow_schema_new_raw(&arrow_schema);
165}
166
167/**
168 * garrow_schema_export:

Callers 2

mainFunction · 0.85
build_schemaFunction · 0.85

Calls 2

garrow_field_get_rawFunction · 0.85
push_backMethod · 0.80

Tested by

no test coverage detected