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

Method ImportChild

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

Source from the content-addressed store, hash-verified

1579 }
1580
1581 Status ImportChild(const ArrayImporter* parent, struct ArrowArray* src) {
1582 if (ArrowArrayIsReleased(src)) {
1583 return Status::Invalid("Cannot import released ArrowArray");
1584 }
1585 recursion_level_ = parent->recursion_level_ + 1;
1586 if (recursion_level_ >= kMaxImportRecursionLevel) {
1587 return Status::Invalid("Recursion level in ArrowArray struct exceeded");
1588 }
1589 device_type_ = parent->device_type_;
1590 memory_mgr_ = parent->memory_mgr_;
1591 // Child buffers will keep the entire parent import alive.
1592 // Perhaps we can move the child structs to an owned area
1593 // when the parent ImportedArrayData::Release() gets called,
1594 // but that is another level of complication.
1595 import_ = parent->import_;
1596 // The ArrowArray shouldn't be moved, it's owned by its parent
1597 c_struct_ = src;
1598 return DoImport();
1599 }
1600
1601 Status ImportDict(const ArrayImporter* parent, struct ArrowArray* src) {
1602 return ImportChild(parent, src);

Callers 2

DoImportMethod · 0.45
DoImportMethod · 0.45

Calls 2

ArrowArrayIsReleasedFunction · 0.85
InvalidFunction · 0.50

Tested by

no test coverage detected