0

in hive casting of decimal to double is returning the exponential form rather than the non scientific form

Example

hive> select cast(12345678910.231 as double);
OK
1.2345678910231E10
Time taken: 0.164 seconds, Fetched: 1 row(s)

but need the value 12345678910.231 stored as double.

select cast(cast(12345678910.231 as double) as double); also wont work and is similar as the above.

I dont need the output format to be change using the prontf() UDF, rather i need the value to be stored and retrieved while querying as a non exponential form.

Taha Naqvi
  • 1,756
  • 14
  • 24
  • 1
    Possible duplicate of [Hive Converting from Double to String Not in Scientific](https://stackoverflow.com/questions/32576187/hive-converting-from-double-to-string-not-in-scientific) – Alex Libov Aug 10 '17 at 08:04

0 Answers0