From 67ec1fe75cb3760a61f02bd0fab8b352ce1167ce Mon Sep 17 00:00:00 2001 From: Weston Pace Date: Tue, 29 Jul 2025 19:26:30 -0700 Subject: [PATCH] feat: don't repartition for the sake of the metadata eraser (#2559) The `MetadataEraserExec` is super lightweight and doesn't really justify partitioning. I had a plan recently that was partitioning just for this node and that seems wasteful. --- rust/lancedb/src/table/datafusion.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rust/lancedb/src/table/datafusion.rs b/rust/lancedb/src/table/datafusion.rs index 940b8831..949c47fe 100644 --- a/rust/lancedb/src/table/datafusion.rs +++ b/rust/lancedb/src/table/datafusion.rs @@ -85,6 +85,14 @@ impl ExecutionPlan for MetadataEraserExec { vec![&self.input] } + fn maintains_input_order(&self) -> Vec { + vec![true; self.children().len()] + } + + fn benefits_from_input_partitioning(&self) -> Vec { + vec![false; self.children().len()] + } + fn with_new_children( self: Arc, children: Vec>, @@ -486,7 +494,6 @@ pub mod tests { TestFixture::check_plan( plan, "MetadataEraserExec - RepartitionExec:... ProjectionExec:... LanceRead:...", )