You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
MonetDBe will treat float literals as integers in simple queries like SELECT 3.14;
To Reproduce
Steps to reproduce the behavior:
In python:
from monetdbe import connect
c = connect()
c.execute("select 3.14;").fetchdf()
Expected behavior
It should print 3.14 instead of 314
Screenshots
Software versions
OS and version: macOS 12.5
Python version: 3.6
MonetDBe-Python version: 0.10.1
Additional context
This problem also happen in the c version of monetdbe (as shown in the second screenshot). But in the full version of MonetDB don't seem to have this issue.
The text was updated successfully, but these errors were encountered:
Interesting find. I'm not entirely sure how to read the second screenshot but the first is very clear.
Note that in these examples, 3.14 is a decimal, not a floating point number. The following query shows the same behavior, it returns 4200: select cast(42 as decimal(5,2)).
joerivanruth
changed the title
Incorrectly treating floating point literal as integer types
Incorrectly treating decimals as integer types
Nov 15, 2022
Describe the bug
MonetDBe will treat float literals as integers in simple queries like
SELECT 3.14;
To Reproduce
Steps to reproduce the behavior:
In python:
Expected behavior
It should print 3.14 instead of 314
Screenshots
![Screen Shot 2022-11-15 at 1 51 11 PM](https://user-images.githubusercontent.com/9933069/201837747-ee8856bb-ac62-4ff3-b4e9-9b23f97b140b.png)
![Screen Shot 2022-11-15 at 1 56 31 PM](https://user-images.githubusercontent.com/9933069/201837795-3d664801-8319-452d-ad5d-62cf70973f77.png)
Software versions
Additional context
This problem also happen in the c version of monetdbe (as shown in the second screenshot). But in the full version of MonetDB don't seem to have this issue.
The text was updated successfully, but these errors were encountered: