Skip to content

NULL value found (oracle DB) #333

Closed
Closed
@wKollendorf

Description

@wKollendorf

What language are you using?

Python

What version are you using?

0.3.1a3

What database are you using?

Oracle

What dataframe are you using?

polars

Can you describe your bug?

When quering a table with a column containing null values and applying an math operation to it, an error is returned by cx.read_sql. When quering without calculation null is returned without any error (expected behaviour). So when doing some calculation with null values, the result also should be null, without throwing an error.

Database setup if the error only happens on specific data or data type

COLUMN_NAME DATA_TYPE NULLABLE DATA_DEFAULT
col1 BINARY_FLOAT yes (null)
col1 BINARY_FLOAT yes (null)

INSERT INTO test ("col1", "col2") VALUES (123, null)
INSERT INTO test ("col1", "col2") VALUES (456, null)

Example query / code
import connectorx as cx

query = 'select col1, round(col2*1000, 2) from test'

df = cx.read_sql( conn, query, return_type='polars') 

What is the error?

NULL value found

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions