capkurmagati commented on a change in pull request #1288:
URL: https://github.com/apache/arrow-datafusion/pull/1288#discussion_r748733755



##########
File path: datafusion/src/catalog/schema.rs
##########
@@ -101,4 +115,70 @@ impl SchemaProvider for MemorySchemaProvider {
         let mut tables = self.tables.write().unwrap();
         Ok(tables.remove(name))
     }
+
+    fn table_exist(&self, name: &str) -> bool {
+        let tables = self.tables.read().unwrap();
+        tables.contains_key(name)
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use crate::arrow::datatypes::SchemaRef;
+    use crate::catalog::schema::{MemorySchemaProvider, SchemaProvider};
+    use crate::datasource::TableProvider;
+    use crate::logical_plan::Expr;
+    use crate::physical_plan::ExecutionPlan;
+    use std::any::Any;
+    use std::sync::Arc;
+
+    use async_trait::async_trait;
+
+    #[tokio::test]
+    async fn test_mem_provider() {
+        struct TestTableProvider();

Review comment:
       Is it necessary to create a test provider?
   `EmptyTable` seems enough for the test. You could create a dummy table using 
`EmptyTable::new(Arc::new(Schema::empty()))`.




-- 
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...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to