sfu-db/connector-x

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

SShivankar05 opened this issue · 0 comments

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