-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing conversion rule for bytea in postgres #148
Comments
I think it should be one new line at https://github.com/sfu-db/connector-x/blob/main/connectorx/src/transports/postgres_arrow.rs#L53 and every other transports.
These two types, https://github.com/sfu-db/connector-x/blob/main/connectorx/src/sources/postgres/typesystem.rs#L27 |
Thanks, I will test in my local project and submit PR if it's working. |
Hi @quambene , we are planning to fix this issue in our next milestone (release next week). It will be great if you can submit this PR by this week. It's also ok if you are busy with other tasks, please let us know and we will work on this then. |
@wangxiaoying Thanks for the reminder, I will definitely check it out this week. |
@wangxiaoying I'm afraid I need your support. Here is my feedback: 1.) You might want to consider to tag your releases similar to https://github.com/pola-rs/polars/tags, i.e., differentiating your rust and python releases. This would be useful for testing bugfixes (https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#testing-a-bugfix), where you can point to a specific release after PR is merged: 2.) Using
by adding However, I'm getting an error in polars now:
which is pointing to https://github.com/pola-rs/polars/blob/4f81a47a306b55f4409a61b6e7fb2313c85d658f/polars/polars-core/src/series/from.rs, and indicates that implementation of LargeBinary type is missing in polars as well?! You can reproduce like this: use connectorx::{
destinations::arrow2::Arrow2Destination,
prelude::{Dispatcher, PostgresArrow2Transport},
sources::postgres::{rewrite_tls_args, BinaryProtocol, PostgresSource},
sql::CXQuery,
};
use polars_core::frame::DataFrame;
use postgres::NoTls;
use url::Url;
pub fn query_postgres(url: Url, query: &str) -> Result<DataFrame, anyhow::Error> {
let (config, _tls) = rewrite_tls_args(&url)?;
let source = PostgresSource::<BinaryProtocol, NoTls>::new(config, NoTls, 10)?;
let mut destination = Arrow2Destination::new();
let queries = &[CXQuery::naked(query)];
let dispatcher = Dispatcher::<_, _, PostgresArrow2Transport<BinaryProtocol, NoTls>>::new(
source,
&mut destination,
queries,
None,
);
dispatcher.run()?;
let df = destination.polars();
Ok(df?)
} where Full branch can be found here: https://github.com/quambene/pigeon-rs/tree/pigeon-1 Any ideas? |
Hi @quambene ,
Thanks for the quick response! |
@wangxiaoying Ok, I will open an issue over at polars then. Or have you already opened one? |
@quambene I haven't yet. Please feel free to do it. |
Error message:
Expected:
BYTEA
in postgresql should be converted toVec<u8>
in RustIs this a time-consuming fix? Happy to assist if this is the case.
The text was updated successfully, but these errors were encountered: