ion-elgreco commented on code in PR #921:
URL: https://github.com/apache/datafusion-python/pull/921#discussion_r1827536226


##########
src/context.rs:
##########
@@ -566,6 +569,26 @@ impl PySessionContext {
         Ok(())
     }
 
+    /// Construct datafusion dataframe from Arrow Table
+    pub fn register_table_provider(
+        &mut self,
+        name: &str,
+        provider: Bound<'_, PyAny>,

Review Comment:
   Just to understand, taking delta-rs as an example.
   
   The provider would be an instance of a deltatable object?



##########
src/context.rs:
##########
@@ -566,6 +569,26 @@ impl PySessionContext {
         Ok(())
     }
 
+    /// Construct datafusion dataframe from Arrow Table
+    pub fn register_table_provider(
+        &mut self,
+        name: &str,
+        provider: Bound<'_, PyAny>,
+        py: Python,
+    ) -> PyResult<()> {
+        if provider.hasattr("__datafusion_table_provider__")? {

Review Comment:
   Should we raise when it doesn't have this attribute, it might give the wrong 
impression for users that they registered it but nothing happened



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to