davisp commented on code in PR #1396:
URL:
https://github.com/apache/datafusion-python/pull/1396#discussion_r2921293222
##########
src/context.rs:
##########
@@ -659,6 +660,34 @@ impl PySessionContext {
Ok(())
}
+ pub fn register_table_factory(
+ &self,
+ format: &str,
+ factory: Bound<'_, PyAny>,
+ ) -> PyDataFusionResult<()> {
+ let py = factory.py();
+ let codec_capsule = create_logical_extension_capsule(py,
self.logical_codec.as_ref())?;
+
+ let capsule = factory
+ .getattr("__datafusion_table_provider_factory__")?
+ .call1((codec_capsule,))?;
+ let capsule = capsule.cast::<PyCapsule>().map_err(py_datafusion_err)?;
Review Comment:
I can't 100% parse what this is suggesting, but I do believe it's addressed
by the ability to use Python for TableProviderFactory instances in [this
commit](https://github.com/apache/datafusion-python/pull/1396/commits/33be408fd0249b20e9e0242311d2745050b57c6a).
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]