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

Incorrectly treating decimals as integer types #175

Closed
sunyinqi0508 opened this issue Nov 15, 2022 · 1 comment
Closed

Incorrectly treating decimals as integer types #175

sunyinqi0508 opened this issue Nov 15, 2022 · 1 comment

Comments

@sunyinqi0508
Copy link

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
Screen Shot 2022-11-15 at 1 51 11 PM
Screen Shot 2022-11-15 at 1 56 31 PM

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.

@joerivanruth
Copy link
Contributor

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 joerivanruth changed the title Incorrectly treating floating point literal as integer types Incorrectly treating decimals as integer types Nov 15, 2022
@sunyinqi0508 sunyinqi0508 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants