* Get orderBy optimization info for a given alias. * Returns undefined if no optimization exists for this alias.
(
alias: string,
)
| 859 | * Returns undefined if no optimization exists for this alias. |
| 860 | */ |
| 861 | private getOrderByInfoForAlias( |
| 862 | alias: string, |
| 863 | ): OrderByOptimizationInfo | undefined { |
| 864 | // optimizableOrderByCollections is keyed by collection ID |
| 865 | const collectionId = this.compiledAliasToCollectionId[alias] |
| 866 | if (!collectionId) return undefined |
| 867 | |
| 868 | const info = this.optimizableOrderByCollections[collectionId] |
| 869 | if (info && info.alias === alias) { |
| 870 | return info |
| 871 | } |
| 872 | return undefined |
| 873 | } |
| 874 | |
| 875 | /** |
| 876 | * After each graph run step, check if any ordered query's topK operator |