You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SQLx provides database pool implementations of postgres and other dbs and is commonly used in the rust ecosystem. In the case of using datafusion-table-providers to expose postgres in datafusion, but also doing other postgres operations with sqlx, it would be ideal to have datafusion-table-providers use the same pool as the rest of the application.
It looks like it would be possible to either replace the underlying bb8 pool with a sqlx one or abstract it so that either could be used.
I'm happy to take a stab at implementing this myself but want to get feedback before I go and do the work
The text was updated successfully, but these errors were encountered:
Yeah, the PostgresConnectionPool struct in src/sql/db_connection_pool/postgrespool.rs encapsulates the BB8 pool and returns instances of PostgresConnection in src/sql/db_connection_pool/dbconnection/postgresconn.rs that wraps the actual bb8::PooledConnection.
I don't see much point having runtime code to select between the two, so it might be better to add a new feature sqlx that when enabled switches the PostgresConnectionPool/PostgresConnection to use the sqlx-based pool.
Happy to review any draft/in-progress code once you have an approach you'd like feedback on.
Looks like this will be a bigger task than I thought initially, using sqlx will also involve replacing the tokio_postgres client and redoing the rows_to_arrow implementation for postgres. Still doable I think just more involved
SQLx provides database pool implementations of postgres and other dbs and is commonly used in the rust ecosystem. In the case of using datafusion-table-providers to expose postgres in datafusion, but also doing other postgres operations with sqlx, it would be ideal to have datafusion-table-providers use the same pool as the rest of the application.
It looks like it would be possible to either replace the underlying bb8 pool with a sqlx one or abstract it so that either could be used.
I'm happy to take a stab at implementing this myself but want to get feedback before I go and do the work
The text was updated successfully, but these errors were encountered: