Skip to content

Commit

Permalink
use compute properties
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanc-n committed Jan 10, 2025
1 parent dc1952a commit 577b47f
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions datafusion/physical-plan/src/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,10 @@ impl MemoryExec {
}
}

let cache = Self::compute_properties_as_value(Arc::clone(&schema));
let partitions = vec![batches];
let cache = Self::compute_properties(Arc::clone(&schema), &[], &partitions);
Ok(Self {
partitions: vec![batches],
partitions,
schema: Arc::clone(&schema),
projected_schema: Arc::clone(&schema),
projection: None,
Expand Down Expand Up @@ -385,15 +386,6 @@ impl MemoryExec {
Boundedness::Bounded,
)
}

fn compute_properties_as_value(schema: SchemaRef) -> PlanProperties {
PlanProperties::new(
EquivalenceProperties::new(schema),
Partitioning::UnknownPartitioning(1),
EmissionType::Incremental,
Boundedness::Bounded,
)
}
}

/// Iterator over batches
Expand Down

0 comments on commit 577b47f

Please sign in to comment.