fn prune_and_annotate_dataflow_index_imports(
dataflow: &mut DataflowDesc,
indexes: &dyn IndexOracle,
dataflow_metainfo: &mut DataflowMetainfo,
) -> Result<(), TransformError>
Expand description
Restricts the indexes imported by dataflow
to only the ones it needs.
It also adds to the DataflowMetainfo
how each index will be used.
It also annotates global Get
s with whether they will be reads from Persist or an index, plus
their index usage types.
The input dataflow
should import all indexes belonging to all views/sources/tables it
references.
The input plans should be normalized with NormalizeLets
! Otherwise we might find dangling
ArrangeBy
s at the top of unused Let bindings.