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.
This commit is contained in:
Weston Pace
2025-07-29 19:26:30 -07:00
committed by GitHub
parent 70d9b04ba5
commit 67ec1fe75c

View File

@@ -85,6 +85,14 @@ impl ExecutionPlan for MetadataEraserExec {
vec![&self.input] vec![&self.input]
} }
fn maintains_input_order(&self) -> Vec<bool> {
vec![true; self.children().len()]
}
fn benefits_from_input_partitioning(&self) -> Vec<bool> {
vec![false; self.children().len()]
}
fn with_new_children( fn with_new_children(
self: Arc<Self>, self: Arc<Self>,
children: Vec<Arc<dyn ExecutionPlan>>, children: Vec<Arc<dyn ExecutionPlan>>,
@@ -486,7 +494,6 @@ pub mod tests {
TestFixture::check_plan( TestFixture::check_plan(
plan, plan,
"MetadataEraserExec "MetadataEraserExec
RepartitionExec:...
ProjectionExec:... ProjectionExec:...
LanceRead:...", LanceRead:...",
) )