| 369 | } |
| 370 | |
| 371 | IndexTableScan* Retrieval::getNavigation() |
| 372 | { |
| 373 | if (!navigationCandidate) |
| 374 | return nullptr; |
| 375 | |
| 376 | IndexScratch* const scratch = navigationCandidate->scratch; |
| 377 | |
| 378 | // Looks like we can do a navigational walk. Flag that |
| 379 | // we have used this index for navigation, and allocate |
| 380 | // a navigational rsb for it. |
| 381 | scratch->index->idx_runtime_flags |= idx_navigate; |
| 382 | |
| 383 | const USHORT key_length = |
| 384 | ROUNDUP(BTR_key_length(tdbb, relation, scratch->index), sizeof(SLONG)); |
| 385 | |
| 386 | InversionNode* const index_node = makeIndexScanNode(scratch); |
| 387 | |
| 388 | return FB_NEW_POOL(getPool()) |
| 389 | IndexTableScan(csb, getAlias(), stream, relation, index_node, key_length, |
| 390 | navigationCandidate->selectivity); |
| 391 | } |
| 392 | |
| 393 | void Retrieval::analyzeNavigation(const InversionCandidateList& inversions) |
| 394 | { |
no test coverage detected