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

Method ImportChild

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

Source from the content-addressed store, hash-verified

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