jorgecarleitao commented on a change in pull request #9445:
URL: https://github.com/apache/arrow/pull/9445#discussion_r572202918



##########
File path: rust/datafusion/src/execution/context.rs
##########
@@ -720,6 +735,9 @@ mod tests {
         ];
         assert_batches_eq!(expected, &results);
 
+        assert_eq!(ctx.deregister_table("dual"), true);
+        assert_eq!(ctx.deregister_table("dual"), false);

Review comment:
       What do you think about moving this to a separate test? This way, if 
something fails, it is more obvious what caused the failure.

##########
File path: rust/datafusion/src/execution/context.rs
##########
@@ -287,6 +287,21 @@ impl ExecutionContext {
             .insert(name.to_string(), provider.into());
     }
 
+    /// Deregisters the named table.
+    /// 
+    /// Returns true if the table was successfully de-reregistered.
+    pub fn deregister_table(
+        &mut self,
+        name: &str
+    ) -> bool {

Review comment:
       I would consider raising an error if it cannot be un-registered instead 
of a boolean.




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