Re: Specifying a double precision in HiveQL

2011-03-15 Thread Amareshwari Sri Ramadasu
You can use UDF round(x,d) which rounds of x to d decimal places Thanks Amareshwari On 2/25/11 1:01 AM, Aurora Skarra-Gallagher aur...@yahoo-inc.com wrote: Hi, I have a Hive query that has a statement like this (sum(itemcount) / count(item)). I want to specify only two digits of precision

RE: Specifying a double precision in HiveQL

2011-02-24 Thread Paul Yang
Hacky, but maybe something like select concat( cast(num as int), '.' , cast(abs(num)*100 as int) % 100) from (select 1.234 as num from src limit 1) a; ? -Original Message- From: Aurora Skarra-Gallagher [mailto:aur...@yahoo-inc.com] Sent: Thursday, February 24, 2011 11:31 AM To: