| 224 | } |
| 225 | |
| 226 | static void appendStorageInfoForIndex(StorageInfoLocalState* localState, DataChunk& outputChunk, |
| 227 | const Index& index) { |
| 228 | const auto indexInfo = index.getIndexInfo(); |
| 229 | for (const auto& entry : index.getStorageEntries()) { |
| 230 | if (entry.pageRange.startPageIdx == INVALID_PAGE_IDX || entry.pageRange.numPages == 0) { |
| 231 | continue; |
| 232 | } |
| 233 | resetOutputIfNecessary(localState, outputChunk); |
| 234 | auto vectorPos = outputChunk.state->getSelVector().getSelSize(); |
| 235 | outputChunk.getValueVectorMutable(0).setValue(vectorPos, std::string{"INDEX"}); |
| 236 | outputChunk.getValueVectorMutable(1).setValue<uint64_t>(vectorPos, INVALID_NODE_GROUP_IDX); |
| 237 | outputChunk.getValueVectorMutable(2).setValue<uint64_t>(vectorPos, INVALID_NODE_GROUP_IDX); |
| 238 | outputChunk.getValueVectorMutable(3).setValue(vectorPos, std::string{"ON_DISK"}); |
| 239 | outputChunk.getValueVectorMutable(4).setValue(vectorPos, indexInfo.name); |
| 240 | outputChunk.getValueVectorMutable(5).setValue(vectorPos, |
| 241 | indexInfo.indexType + ":" + entry.component); |
| 242 | outputChunk.getValueVectorMutable(6).setValue<uint64_t>(vectorPos, |
| 243 | entry.pageRange.startPageIdx); |
| 244 | outputChunk.getValueVectorMutable(7).setValue<uint64_t>(vectorPos, |
| 245 | entry.pageRange.numPages); |
| 246 | outputChunk.getValueVectorMutable(8).setValue<uint64_t>(vectorPos, entry.sizeBytes); |
| 247 | outputChunk.getValueVectorMutable(9).setValue(vectorPos, std::string{}); |
| 248 | outputChunk.getValueVectorMutable(10).setValue(vectorPos, std::string{}); |
| 249 | outputChunk.getValueVectorMutable(11).setValue(vectorPos, std::string{}); |
| 250 | outputChunk.state->getSelVectorUnsafe().incrementSelSize(); |
| 251 | } |
| 252 | } |
| 253 | |
| 254 | static offset_t tableFunc(const TableFuncInput& input, TableFuncOutput& output) { |
| 255 | auto& dataChunk = output.dataChunk; |
no test coverage detected