Skip to content

Commit 624f930

Browse files
authored
refactor: remove the unused plan_with_context method (#121)
1 parent ebfaba3 commit 624f930

1 file changed

Lines changed: 0 additions & 39 deletions

File tree

  • crates/lance-graph/src/datafusion_planner

crates/lance-graph/src/datafusion_planner/mod.rs

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -62,45 +62,6 @@ impl DataFusionPlanner {
6262
}
6363
}
6464

65-
pub fn plan_with_context(
66-
&self,
67-
logical_plan: &LogicalOperator,
68-
datasets: &std::collections::HashMap<String, arrow::record_batch::RecordBatch>,
69-
) -> Result<LogicalPlan> {
70-
use crate::source_catalog::{InMemoryCatalog, SimpleTableSource};
71-
72-
// Use the analyze() method to extract metadata
73-
let analysis = analysis::analyze(logical_plan)?;
74-
75-
// Build an in-memory catalog from provided datasets (nodes and relationships)
76-
let mut catalog = InMemoryCatalog::new();
77-
78-
// Register node sources from required datasets
79-
for label in &analysis.required_datasets {
80-
if self.config.node_mappings.contains_key(label) {
81-
if let Some(batch) = datasets.get(label) {
82-
let src = Arc::new(SimpleTableSource::new(batch.schema()));
83-
catalog = catalog.with_node_source(label, src);
84-
}
85-
}
86-
}
87-
88-
// Register relationship sources from required datasets
89-
for rel_type in &analysis.required_datasets {
90-
if self.config.relationship_mappings.contains_key(rel_type) {
91-
if let Some(batch) = datasets.get(rel_type) {
92-
let src = Arc::new(SimpleTableSource::new(batch.schema()));
93-
catalog = catalog.with_relationship_source(rel_type, src);
94-
}
95-
}
96-
}
97-
98-
// Plan using a planner bound to this catalog so scans get qualified projections
99-
let planner_with_cat =
100-
DataFusionPlanner::with_catalog(self.config.clone(), Arc::new(catalog));
101-
planner_with_cat.plan(logical_plan)
102-
}
103-
10465
/// Helper to convert DataFusion builder errors into GraphError::PlanError with context
10566
pub(crate) fn plan_error<E: std::fmt::Display>(
10667
&self,

0 commit comments

Comments
 (0)