Skip to content

Update int/float size for PostgreSQL, add PostgreSQL tests and fix various bugs #743

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

Merged
merged 22 commits into from
Jan 31, 2025

Conversation

EricFecteau
Copy link
Collaborator

Goal

The goal of this pull request is to:

  • Make the size of the int and float smaller (e.g. don't convert all i16 to i64) -- this adds the framework for Int dtypes are unnecessarily big #688 for Postgres -> Polars, but not mysql -> Polars)
  • Add tests for these types (and all other types) - mostly in Postgres for now

Comments

  • While writing more tests, I changed the PostgreSQL examples, so had to update the relevant tests in Rust and Python.
  • I wrote tests for the the 4 protocols for PostgreSQL: Binary, CSV, Cursor and Simple
  • Made clippy happy in various places (mostly PostgreSQL)

Bugs

While writing tests, I encountered a few bugs and solved them:

  • Bug when Null are included inside an array (all types) #736 Null within an array would fail in PostgreSQL! I implemented this to work in Rust. I did not implement this for Pandas (but kept it as-is, with an unimplemented!
  • Bug in TimeStamp with Time Zones for Arrow #735 The UTC time being used in the crate was not recognized by Arrow, due to the lack of the chrono-tz feature. Fixed by moving to +00:00 instead.
  • The PostgreSQL CSV and Simple protocol did not implement millisecond for time, so I implemented it.
  • Bool was incorrectly implemented for the PostgreSQL Simple protocol, so I fix it!

Copy link
Contributor

@wangxiaoying wangxiaoying left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @EricFecteau , thanks for the PR! It looks good. I only left a few comments.

@wangxiaoying wangxiaoying merged commit f633123 into main Jan 31, 2025
2 checks passed
@EricFecteau EricFecteau deleted the data-type branch January 31, 2025 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants