Skip to content

BIGINT from Oracle are truncated to 2147483647 #537

@DATA2PLAYvf

Description

@DATA2PLAYvf
  1. What versions are you using? 3.3.0
    Give your Oracle Database version, e.g.: 19.22.0.0.0
    Give your Oracle Client version (if you are using Thick mode): (19, 6, 0, 0, 0)

platform.platform: Windows-2022Server-10.0.20348-SP0
sys.maxsize > 2**32: True
platform.python_version: 3.12.10

oracledb.version: 3.3.0

  1. Is it an error or a hang or a crash?
    An error (I think, maybe I did something wrong !)

  2. What error(s) or behavior you are seeing?
    For an Oracle NUMBER(15), I don't get good numbers on pyarrow side

  3. Does your application call init_oracle_client()?
    I use thick mode

  4. Include a runnable Python script that shows the problem.

SQL

CREATE TABLE test_bigint (
    my_value NUMBER(15)
);

INSERT INTO test_bigint (my_value)
VALUES (250000193647634);

COMMIT;

PYTHON


# load oracle data into polars (it is the same with pandas)
odf = conn.fetch_df_all(statement="select * from test_bigint")
pl.from_arrow(odf)

Log :
shape: (1, 1)
MY_VALUE
i64
2147483647

Everything is fine without using ODF

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions