Build the oracle from a dataflow's `index_imports`, grouping by arranged id.
(index_imports: &BTreeMap<GlobalId, IndexImport>)
| 91 | impl ImportedIndexOracle { |
| 92 | /// Build the oracle from a dataflow's `index_imports`, grouping by arranged id. |
| 93 | fn new(index_imports: &BTreeMap<GlobalId, IndexImport>) -> Self { |
| 94 | let mut by_on_id: BTreeMap<GlobalId, Vec<(GlobalId, Vec<MirScalarExpr>)>> = BTreeMap::new(); |
| 95 | for (index_id, import) in index_imports { |
| 96 | by_on_id |
| 97 | .entry(import.desc.on_id) |
| 98 | .or_default() |
| 99 | .push((*index_id, import.desc.key.clone())); |
| 100 | } |
| 101 | ImportedIndexOracle { by_on_id } |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | impl IndexOracle for ImportedIndexOracle { |