Skip to content

Apache DataFusion SQL Query Engine

fix docs of register_table to match implementation (#13438)

Adrian Garcia Badaracco6d8313ebc865
diff --git a/datafusion/core/src/execution/context/mod.rs b/datafusion/core/src/execution/context/mod.rs
index 45dfe83588..5f01d41c31 100644
--- a/datafusion/core/src/execution/context/mod.rs
+++ b/datafusion/core/src/execution/context/mod.rs
@@ -1428,8 +1428,8 @@ impl SessionContext {
/// Registers a [`TableProvider`] as a table that can be
/// referenced from SQL statements executed against this context.
///
- /// Returns the [`TableProvider`] previously registered for this
- /// reference, if any
+ /// If a table of the same name was already registered, returns "Table
+ /// already exists" error.
pub fn register_table(
&self,
table_ref: impl Into<TableReference>,