jonahgao commented on code in PR #14011: URL: https://github.com/apache/datafusion/pull/14011#discussion_r1903283608
########## datafusion/core/src/datasource/memory.rs: ########## @@ -265,6 +265,10 @@ impl TableProvider for MemTable { input: Arc<dyn ExecutionPlan>, insert_op: InsertOp, ) -> Result<Arc<dyn ExecutionPlan>> { + if self.batches.is_empty() { Review Comment: Since we [allow](https://github.com/apache/datafusion/blob/78ee13a7cfdb741d91be805e4117281a2054d2d3/datafusion/physical-plan/src/execution_plan.rs#L817) scanning a MemTable with zero partitions, it seems appropriate to perform this check here. -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org