tustvold commented on code in PR #6049:
URL: https://github.com/apache/arrow-datafusion/pull/6049#discussion_r1175629119


##########
datafusion/core/src/datasource/memory.rs:
##########
@@ -19,33 +19,31 @@
 //! queried by DataFusion. This allows data to be pre-loaded into memory and 
then
 //! repeatedly queried without incurring additional file I/O overhead.
 
-use futures::{StreamExt, TryStreamExt};
 use std::any::Any;
 use std::sync::Arc;
 
 use arrow::datatypes::SchemaRef;
 use arrow::record_batch::RecordBatch;
 use async_trait::async_trait;
-use datafusion_expr::LogicalPlan;
+use futures::StreamExt;
 use tokio::sync::RwLock;
-use tokio::task;
 
 use crate::datasource::{TableProvider, TableType};
 use crate::error::{DataFusionError, Result};
 use crate::execution::context::SessionState;
 use crate::logical_expr::Expr;
-use crate::physical_plan::coalesce_partitions::CoalescePartitionsExec;
 use crate::physical_plan::common;
 use crate::physical_plan::common::AbortOnDropSingle;
 use crate::physical_plan::memory::MemoryExec;
+use crate::physical_plan::memory_insert::MemoryWriteExec;
 use crate::physical_plan::ExecutionPlan;
 use crate::physical_plan::{repartition::RepartitionExec, Partitioning};
 
 /// In-memory table
 #[derive(Debug)]
 pub struct MemTable {
     schema: SchemaRef,
-    batches: Arc<RwLock<Vec<Vec<RecordBatch>>>>,
+    pub(crate) batches: Arc<Vec<Arc<RwLock<Vec<RecordBatch>>>>>,

Review Comment:
   This seems to have a lot more indirections than really necessary, it could 
conceivably be `Arc<[RwLock<Vec<RecordBatch>>]>`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to