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

Infinity numbers in oracle database produce an exception in cx_oracle.py (_detect_decimal) #4064

Closed
sqlalchemy-bot opened this issue Sep 1, 2017 · 14 comments
Labels
bug Something isn't working oracle
Milestone

Comments

@sqlalchemy-bot
Copy link
Collaborator

Migrated issue, originally created by Oleg Talalov (@olegtalalov)

Customer's database contains BINARY_FLOAT_INFINITY value in one column in few rows.

During requsting rows in fetch, function _detect_decimal called with value '' and raise exception:
ValueError: invalid literal for int() with base 10: '
'

I use cx_orcale 5.3 and 6.0

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

@sqlalchemy-bot
Copy link
Collaborator Author

Michael Bayer (@zzzeek) wrote:

I don't have a quick fix for this right now, I am working on Oracle numerics in 1.2 and will take this into account. As for a backport to 1.1, I'll have to see what's possible. I am hoping you can work around this on the query side for now, e.g. use a CAST to String or something similar so you can get the data from this table back.

@sqlalchemy-bot
Copy link
Collaborator Author

Changes by Michael Bayer (@zzzeek):

  • set milestone to "1.1.x"

@sqlalchemy-bot
Copy link
Collaborator Author

Michael Bayer (@zzzeek) wrote:

I can get this in 1.2 as I am needing to rewrite the entire numeric support to accommodate for cx_Oracle 6. Getting it into 1.1 would require significant changes to the existing numeric system that are too risky for how far 1.1 is along. I'm hoping you're able to work around your issue for the moment with a CAST to string.

@sqlalchemy-bot
Copy link
Collaborator Author

Changes by Michael Bayer (@zzzeek):

  • changed milestone from "1.1.x" to "1.2"

@sqlalchemy-bot
Copy link
Collaborator Author

Oleg Talalov (@olegtalalov) wrote:

Thank you, this is not block my work.

@sqlalchemy-bot
Copy link
Collaborator Author

Michael Bayer (@zzzeek) wrote:

Refactor for cx_Oracle version 6

Drops support for cx_Oracle prior to version 5.x, reworks
numeric and binary support.

Fixes: #4064

Change-Id: Ib9ae9aba430c15cd2a6eeb4e5e3fd8e97b5fe480

31f80b9

@sqlalchemy-bot
Copy link
Collaborator Author

Changes by Michael Bayer (@zzzeek):

  • changed status to closed

@sqlalchemy-bot
Copy link
Collaborator Author

Michael Bayer (@zzzeek) wrote:

i have some additional changes that will make infinity work fully

@sqlalchemy-bot
Copy link
Collaborator Author

Changes by Michael Bayer (@zzzeek):

  • changed status to reopened

@sqlalchemy-bot
Copy link
Collaborator Author

Michael Bayer (@zzzeek) wrote:

discussion over at oracle/python-cx_Oracle#78 has the additional details.

@sqlalchemy-bot
Copy link
Collaborator Author

@sqlalchemy-bot
Copy link
Collaborator Author

Michael Bayer (@zzzeek) wrote:

Open up all cx_Oracle numeric tests, finish infinity support

Added some additional rules to fully handle Decimal('Infinity'),
Decimal('-Infinity') values with cx_Oracle numerics when using
asdecimal=True.

Allow remaining cx_Oracle numeric tests that were waiting
for the refactor to be finished and forgot to get enabled.

Change-Id: I1e2365176e34559c0230c84f800a7cfe0a034ed5
Fixes: #4064

a5d027a

@sqlalchemy-bot
Copy link
Collaborator Author

Changes by Michael Bayer (@zzzeek):

  • changed status to closed

@sqlalchemy-bot
Copy link
Collaborator Author

Michael Bayer (@zzzeek) wrote:

Issue #3507 was marked as a duplicate of this issue.

@sqlalchemy-bot sqlalchemy-bot added oracle bug Something isn't working labels Nov 27, 2018
@sqlalchemy-bot sqlalchemy-bot added this to the 1.2 milestone Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working oracle
Projects
None yet
Development

No branches or pull requests

1 participant