| 25 | } |
| 26 | |
| 27 | ArrowNodeTable::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 | |
| 45 | ArrowNodeTable::~ArrowNodeTable() { |
| 46 | // Unregister Arrow data from the global registry when table is destroyed |
nothing calls this directly
no test coverage detected