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

Function ReleaseExportedSchema

cpp/src/arrow/c/bridge.cc:115–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113};
114
115void ReleaseExportedSchema(struct ArrowSchema* schema) {
116 if (ArrowSchemaIsReleased(schema)) {
117 return;
118 }
119 for (int64_t i = 0; i < schema->n_children; ++i) {
120 struct ArrowSchema* child = schema->children[i];
121 ArrowSchemaRelease(child);
122 DCHECK(ArrowSchemaIsReleased(child))
123 << "Child release callback should have marked it released";
124 }
125 struct ArrowSchema* dict = schema->dictionary;
126 if (dict != nullptr) {
127 ArrowSchemaRelease(dict);
128 DCHECK(ArrowSchemaIsReleased(dict))
129 << "Dictionary release callback should have marked it released";
130 }
131 DCHECK_NE(schema->private_data, nullptr);
132 delete reinterpret_cast<ExportedSchemaPrivateData*>(schema->private_data);
133
134 ArrowSchemaMarkReleased(schema);
135}
136
137template <typename SizeType>
138Result<int32_t> DowncastMetadataSize(SizeType size) {

Callers

nothing calls this directly

Calls 3

ArrowSchemaIsReleasedFunction · 0.85
ArrowSchemaReleaseFunction · 0.85
ArrowSchemaMarkReleasedFunction · 0.85

Tested by

no test coverage detected