MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / ArrowNodeTable

Method ArrowNodeTable

src/storage/table/arrow_node_table.cpp:27–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27ArrowNodeTable::ArrowNodeTable(const StorageManager* storageManager,
28 const catalog::NodeTableCatalogEntry* nodeTableEntry, MemoryManager* memoryManager,
29 ArrowSchemaWrapper schema, std::vector<ArrowArrayWrapper> arrays, std::string arrowId)
30 : ColumnarNodeTableBase{storageManager, nodeTableEntry, memoryManager,
31 std::make_unique<ArrowNodeTableScanSharedState>(scanMorselSize)},
32 schema{std::move(schema)}, arrays{std::move(arrays)}, totalRows{0},
33 arrowId{std::move(arrowId)} {
34 // Note: release may be nullptr if schema is managed by registry
35 if (!this->schema.format) {
36 throw common::RuntimeException("Arrow schema format cannot be null");
37 }
38 batchStartOffsets.reserve(this->arrays.size());
39 for (const auto& array : this->arrays) {
40 batchStartOffsets.push_back(totalRows);
41 totalRows += getArrowBatchLength(array);
42 }
43}
44
45ArrowNodeTable::~ArrowNodeTable() {
46 // Unregister Arrow data from the global registry when table is destroyed

Callers

nothing calls this directly

Calls 4

getArrowBatchLengthFunction · 0.70
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected