-
Notifications
You must be signed in to change notification settings - Fork 358
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
Backwards incompatibility between cx_Oracle 7.0.0 and 7.1.1 returning numbers #279
Comments
This is noted in the release notes:
From your example it looks like the code isn't quite as smart as it could be -- the leading zeroes in this case don't affect precision. Is that the concern? If you don't like the default behaviour you can always use an outputtypehandler to return whatever you wish, of course! |
Hi Anthony, The concern is not related to the precision. It is related to the data type that we get after loading the Oracle data into a pandas dataframe:
|
Thanks for the explanation. I'll discuss it internally and get back to you on this. |
Ok. I've discussed this internally and thought about it a bit more -- and decided that the decision to return decimal numbers when precision would be lost was a bit too much -- a nice idea but with undesirable consequences as you have noted! So I am reverting that and will release that change with 7.1.2. Thanks for letting me know. |
…as too great to be returned accurately as a floating point number. This change had too great an impact on existing functionality and an output type handler can be used to return decimal numbers where that is desirable (#279).
Thanks for let us know. We will upgrade to 7.1.2 when it is available. Thanks |
This was addressed in cx_Oracle 7.1.2 which was just released. |
Backwards incompatibility between cx_Oracle 7.0.0 and 7.1.1
There is a difference between Cx_Oracle 7.0.0 and 7.1.1 when returning numbers.
In 7.0.0 the fetchall returns 9.93527465e-06 while the version 7.1.1 returns Decimal('0.00000993527465') .
Details
The Oracle table is defined as follows:
The select statement is a simple query:
A select statement using Toad shows
Using cx_Oracle version 7.0.0, the returned value is 9.93527465e-06
Using cx_Oracle version 7.1.1 the returned value is Decimal('0.00000993527465')
OS Versions for cx_Oracle version 7.0.0
INSTALLED VERSIONS
python: 3.6.4.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
OS Versions for cx_Oracle version 7.1.1
INSTALLED VERSIONS
python: 3.7.1.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
Oracle Database version
The text was updated successfully, but these errors were encountered: