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

Cast decimals to ruby BigDecimals #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oggy
Copy link

@oggy oggy commented Sep 28, 2018

This is particularly a problem since 0.198, where decimal literals are now interpreted as DECIMAL by default, which means a query like SELECT 1.0 was coming through as a String.

This is particularly a problem since
[0.198](https://prestodb.io/docs/current/release/release-0.198.html),
where decimal literals are now interpreted as `DECIMAL` by default,
which means a query like `SELECT 1.0` was coming through as a String.
Copy link
Contributor

@Lewuathe Lewuathe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, good catch. But the latest presto returns decimal type as String in JSON encoding.
It would be better to keep the returned type as much as possible to avoid unnecessary consufion.

If users want to use decimal as numeric type, they can do that by checking type information.

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

Successfully merging this pull request may close these issues.

2 participants