1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use std::path::PathBuf;

use polars_core::prelude::*;
use polars_plan::prelude::*;

/// Get a set of the data source paths in this LogicalPlan
pub(crate) fn agg_source_paths(
    root_lp: Node,
    acc_paths: &mut PlHashSet<PathBuf>,
    lp_arena: &Arena<IR>,
) {
    lp_arena.iter(root_lp).for_each(|(_, lp)| {
        use IR::*;
        if let Scan { paths, .. } = lp {
            for path in paths.as_ref() {
                acc_paths.insert(path.clone());
            }
        }
    })
}