@@ -268,8 +268,7 @@ impl PyDataFrame {
268268 }
269269 }
270270
271- #[ allow( clippy:: wrong_self_convention) ]
272- pub ( crate ) fn into_view_provider ( & self ) -> Arc < dyn TableProvider + Send > {
271+ pub ( crate ) fn to_view_provider ( & self ) -> Arc < dyn TableProvider + Send > {
273272 self . df . as_ref ( ) . clone ( ) . into_view ( )
274273 }
275274
@@ -400,17 +399,14 @@ impl PyDataFrame {
400399
401400 /// Convert this DataFrame into a Table that can be used in register_table
402401 /// By convention, into_... methods consume self and return the new object.
403- /// Disabling the clippy lint, so we can use &self
404- /// because we're working with Python bindings
405- /// where objects are shared
402+ /// Here we intentionally borrow to avoid invalidating the Python wrapper.
406403 /// https://github.com/apache/datafusion-python/pull/1016#discussion_r1983239116
407404 /// - we have not decided on the table_provider approach yet
408- #[ allow( clippy:: wrong_self_convention) ]
409405 pub fn into_view ( & self ) -> PyDataFusionResult < PyTableProvider > {
410406 // Call the underlying Rust DataFrame::into_view method.
411407 // Note that the Rust method consumes self; here we clone the inner Arc<DataFrame>
412408 // so that we don't invalidate this PyDataFrame.
413- let table_provider = self . into_view_provider ( ) ;
409+ let table_provider = self . to_view_provider ( ) ;
414410 Ok ( PyTableProvider :: new ( table_provider) )
415411 }
416412
0 commit comments