alamb commented on a change in pull request #9487:
URL: https://github.com/apache/arrow/pull/9487#discussion_r575677911



##########
File path: rust/datafusion/src/execution/context.rs
##########
@@ -289,14 +289,12 @@ impl ExecutionContext {
 
     /// Deregisters the named table.
     ///
-    /// Returns true if the table was successfully de-reregistered.
-    pub fn deregister_table(&mut self, name: &str) -> bool {
-        self.state
-            .lock()
-            .unwrap()
-            .datasources
-            .remove(&name.to_string())
-            .is_some()
+    /// Returns the registered provider, if any
+    pub fn deregister_table(
+        &mut self,
+        name: &str,
+    ) -> Option<Arc<dyn TableProvider + Send + Sync>> {

Review comment:
       This changes the signature of `deregister_table` to be consistent with 
other Rust ecosystem APIs and returned the previously registered item, if any




----------------------------------------------------------------
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.

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


Reply via email to