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

Method ImportChild

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

Source from the content-addressed store, hash-verified

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