sfu-db / connector-x

Fastest library to load data from DB to DataFrames in Rust and Python
https://sfu-db.github.io/connector-x
MIT License
1.94k stars 154 forks source link

Unable to get time part from date datatype column from oracle DB #559

Open SShivankar05 opened 9 months ago

SShivankar05 commented 9 months ago

What language are you using?

Python

What version are you using?

connectorx==0.3.2a2

What database are you using?

Oracle 19C

What dataframe are you using?

Polars, Arrow2

Can you describe your bug?

I have table in oracle with a column datatype is date. Values saved in it are 09-12-2023 09:11:24 09-12-2023 09:08:33 09-12-2023 09:08:33 09-12-2023 09:05:24 image

When used cx.read_sql, I am getting only date from column, not the time part.

What are the steps to reproduce the behavior?

  1. Create a table in oracle with a column datatype is date. Add some records with values like below 09-12-2023 09:05:24 image

  2. Retrieve the same records with cx.read_sql & return_type as polars, arrows

  3. Analyze values retrieved.
    Date fetched from db is '09-12-2023 00:00:00'

What is the error?

No error. But, difference is values.

Expected - 09-12-2023 09:05:24 Actual - 09-12-2023 00:00:00