phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bulvik, Noam" <Noam.Bul...@teoco.com>
Subject RE: can I prevent rounding of a/b when a and b are integers
Date Thu, 22 Sep 2016 05:39:22 GMT
Thanks for the workaround , but it is not a solution for our case. We have an app that let
user write their own SQL and we can’t tell them to always write int numbers as xxx.0

I created  https://issues.apache.org/jira/browse/PHOENIX-3312

Regards,
Noam



From: James Taylor [mailto:jamestaylor@apache.org]
Sent: Wednesday, September 21, 2016 6:03 PM
To: user <user@phoenix.apache.org>
Subject: Re: can I prevent rounding of a/b when a and b are integers

Hi Noam,
Please file a JIRA. As a workaround, you can do SELECT 1.0/3.
Thanks,
James

On Wed, Sep 21, 2016 at 12:48 AM, Bulvik, Noam <Noam.Bulvik@teoco.com<mailto:Noam.Bulvik@teoco.com>>
wrote:
Hi,

When I do something like select 1/3 from <my table>  the result will be integer value
(0) and not double or alike(0.33….). Is there some configuration that can force the result
to be double

BTW – when executing the same query in oracle (select 1/3 from dual ) I get correct result
same in impala

Noam Bulvik


________________________________

PRIVILEGED AND CONFIDENTIAL
PLEASE NOTE: The information contained in this message is privileged and confidential, and
is intended only for the use of the individual to whom it is addressed and others who have
been specifically authorized to receive it. If you are not the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this communication is strictly
prohibited. If you have received this communication in error, or if any problems occur with
transmission, please contact sender. Thank you.


________________________________

PRIVILEGED AND CONFIDENTIAL
PLEASE NOTE: The information contained in this message is privileged and confidential, and
is intended only for the use of the individual to whom it is addressed and others who have
been specifically authorized to receive it. If you are not the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this communication is strictly
prohibited. If you have received this communication in error, or if any problems occur with
transmission, please contact sender. Thank you.
Mime
View raw message