You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by upd r <up...@gmail.com> on 2014/08/26 20:24:39 UTC
Reg: Controlling number of Precision digits
Hi,
Can someone please tell me if there is a way to alter the precision digits
for a double/float data type to 2 or 3.
Eg: 232879.7979879 to 232879.79
Thanks,
UPD
Re: Reg: Controlling number of Precision digits
Posted by upd r <up...@gmail.com>.
Thanks Bala.
On Tue, Aug 26, 2014 at 11:31 AM, Bala Krishna Gangisetty <
bala@altiscale.com> wrote:
> I suppose your query is against HIVE, you can take advantage of round()
> built-in UDF function.
>
> --Bala G.
>
>
> On Tue, Aug 26, 2014 at 11:24 AM, upd r <up...@gmail.com> wrote:
>
>> Hi,
>>
>> Can someone please tell me if there is a way to alter the precision
>> digits for a double/float data type to 2 or 3.
>> Eg: 232879.7979879 to 232879.79
>>
>> Thanks,
>> UPD
>>
>
>
Re: Reg: Controlling number of Precision digits
Posted by Bala Krishna Gangisetty <ba...@altiscale.com>.
I suppose your query is against HIVE, you can take advantage of round()
built-in UDF function.
--Bala G.
On Tue, Aug 26, 2014 at 11:24 AM, upd r <up...@gmail.com> wrote:
> Hi,
>
> Can someone please tell me if there is a way to alter the precision digits
> for a double/float data type to 2 or 3.
> Eg: 232879.7979879 to 232879.79
>
> Thanks,
> UPD
>
Re: Reg: Controlling number of Precision digits
Posted by Nagarjuna Vissarapu <na...@gmail.com>.
If you want to convert 232879.7979879 to 232879.79 use BigDecimal class
On Tue, Aug 26, 2014 at 2:24 PM, upd r <up...@gmail.com> wrote:
> Hi,
>
> Can someone please tell me if there is a way to alter the precision digits
> for a double/float data type to 2 or 3.
> Eg: 232879.7979879 to 232879.79
>
> Thanks,
> UPD
>
--
With Thanks & Regards
Nagarjuna Vissarapu
9052179339