Skip to content
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

NULL value found (oracle DB) #333

Closed
wKollendorf opened this issue Aug 24, 2022 · 3 comments
Closed

NULL value found (oracle DB) #333

wKollendorf opened this issue Aug 24, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@wKollendorf
Copy link
Contributor

wKollendorf commented Aug 24, 2022

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

@wKollendorf wKollendorf added the bug Something isn't working label Aug 24, 2022
@wangxiaoying
Copy link
Contributor

Hi @wKollendorf , thanks for reporting this error. Can you try pip install connectorx==0.3.1a4 to see whether the new version works?

@wKollendorf
Copy link
Contributor Author

Hi @wangxiaoying, thanks it is working now! By the way, pip only found version 0.3.1a1. I just built it from master (version 0.3.1.a5).

@wangxiaoying
Copy link
Contributor

By the way, pip only found version 0.3.1a1. I just built it from master (version 0.3.1.a5).

I'm not sure whether it is caused by your dependency issue. But it seems working for me locally:
image Anyway I will close this issue. Thanks for the response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants