This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new f26c540d09 Remove unnecessary api from MemTable (#6861)
f26c540d09 is described below
commit f26c540d09cb04df9e132615be14779bda752057
Author: Metehan Yıldırım <[email protected]>
AuthorDate: Thu Jul 6 23:35:36 2023 +0300
Remove unnecessary api from MemTable (#6861)
---
datafusion/core/src/datasource/memory.rs | 4 ++--
datafusion/core/src/physical_plan/memory.rs | 17 -----------------
2 files changed, 2 insertions(+), 19 deletions(-)
diff --git a/datafusion/core/src/datasource/memory.rs
b/datafusion/core/src/datasource/memory.rs
index 5398bb0903..967eb988eb 100644
--- a/datafusion/core/src/datasource/memory.rs
+++ b/datafusion/core/src/datasource/memory.rs
@@ -169,8 +169,8 @@ impl TableProvider for MemTable {
let inner_vec = arc_inner_vec.read().await;
partitions.push(inner_vec.clone())
}
- Ok(Arc::new(MemoryExec::try_new_owned_data(
- partitions,
+ Ok(Arc::new(MemoryExec::try_new(
+ &partitions,
self.schema(),
projection.cloned(),
)?))
diff --git a/datafusion/core/src/physical_plan/memory.rs
b/datafusion/core/src/physical_plan/memory.rs
index 16c22a3b2d..0601d6fc94 100644
--- a/datafusion/core/src/physical_plan/memory.rs
+++ b/datafusion/core/src/physical_plan/memory.rs
@@ -151,23 +151,6 @@ impl MemoryExec {
})
}
- /// Create a new execution plan for reading in-memory record batches
- /// The provided `schema` should not have the projection applied.
- pub fn try_new_owned_data(
- partitions: Vec<Vec<RecordBatch>>,
- schema: SchemaRef,
- projection: Option<Vec<usize>>,
- ) -> Result<Self> {
- let projected_schema = project_schema(&schema, projection.as_ref())?;
- Ok(Self {
- partitions,
- schema,
- projected_schema,
- projection,
- sort_information: None,
- })
- }
-
/// Set sort information
pub fn with_sort_information(
mut self,