Skip to content
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

Support array for arrow #339

Closed
wonb168 opened this issue Sep 2, 2022 · 4 comments
Closed

Support array for arrow #339

wonb168 opened this issue Sep 2, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@wonb168
Copy link

wonb168 commented Sep 2, 2022

array column like: {1,2,3}
df=cx.read_sql(con_pg, sql,return_type='arrow2')
RuntimeError: No conversion rule from Int4Array(true) to connectorx::destinations::arrow::typesystem::ArrowTypeSystem.

@wonb168 wonb168 added the bug Something isn't working label Sep 2, 2022
@wangxiaoying wangxiaoying changed the title error: array column to arrow raise error Support array for arrow Sep 5, 2022
@wangxiaoying
Copy link
Contributor

Hi @wonb168 , thanks for opening the issue. Unfortunately, we currently do not support list type in arrow. Will add this to our todo list.

@wonb168
Copy link
Author

wonb168 commented Sep 15, 2022

Hi @wonb168 , thanks for opening the issue. Unfortunately, we currently do not support list type in arrow. Will add this to our todo list.

but why I use pandas's read_sql, and then change to arrow is OK?
Unfortunately, pandas changed int to float if have null in int column, and pandas is slow.

@wangxiaoying
Copy link
Contributor

Hi @wonb168 , thanks for opening the issue. Unfortunately, we currently do not support list type in arrow. Will add this to our todo list.

but why I use pandas's read_sql, and then change to arrow is OK? Unfortunately, pandas changed int to float if have null in int column, and pandas is slow.

If the destination is set to arrow, connectorx will directly write the result into arrow instead of writing to pandas first and convert to arrow. Currently array type is supported for pandas in connectorx but not for arrow/arrow2.

@wangxiaoying
Copy link
Contributor

Hi @wonb168 , we have added array support in the newest alpha version for arrow2. Please feel free to try pip install connectorx==0.3.1a7 and test whether it works.

@wangxiaoying wangxiaoying added enhancement New feature or request and removed bug Something isn't working labels Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants